[open-ils-commits] r19175 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Search (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jan 13 21:49:35 EST 2011
Author: dbs
Date: 2011-01-13 21:49:33 -0500 (Thu, 13 Jan 2011)
New Revision: 19175
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm
Log:
Enable truncation attribute in Z39.50 queries to be left out entirely
Per https://bugs.launchpad.net/evergreen/+bug/702695, some Z39.50
servers hate the truncation attribute (@attr 5=anything) and always
return 0 hits.
This gives you the ability to specify a negative value for the
truncation attribute and thereby prevent the truncation attribute
from being included in the Z39.50 query for a given server.
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm 2011-01-13 01:12:30 UTC (rev 19174)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm 2011-01-14 02:49:33 UTC (rev 19175)
@@ -447,7 +447,8 @@
next unless ( exists $services{$service}->{attrs}->{$_} );
$str .= '@attr 1=' . $services{$service}->{attrs}->{$_}->{code} . # add the use attribute
' @attr 4=' . $services{$service}->{attrs}->{$_}->{format}; # add the structure attribute
- if (exists $services{$service}->{attrs}->{$_}->{truncation}){
+ if (exists $services{$service}->{attrs}->{$_}->{truncation}
+ && $services{$service}->{attrs}->{$_}->{truncation} >= 0) {
$str .= ' @attr 5=' . $services{$service}->{attrs}->{$_}->{truncation};
}
$str .= " \"" . $$hash{$_} . "\" "; # add the search term
More information about the open-ils-commits
mailing list