[open-ils-commits] r9394 -
branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Search
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Apr 21 12:20:44 EDT 2008
Author: erickson
Date: 2008-04-21 11:41:45 -0400 (Mon, 21 Apr 2008)
New Revision: 9394
Modified:
branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm
Log:
added support for for truncation attribute to z39 queries. Thanks, James!
Modified: branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm
===================================================================
--- branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm 2008-04-20 13:05:41 UTC (rev 9393)
+++ branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm 2008-04-21 15:41:45 UTC (rev 9394)
@@ -284,13 +284,13 @@
# "structure attribute"
# -------------------------------------------------------------------
for( keys %$hash ) {
-# $str .= '@attr ' .
-# $services{$service}->{attrs}->{$_}->{format} . '=' .
-# $services{$service}->{attrs}->{$_}->{code} . " \"" . $$hash{$_} . "\" ";
- $str .=
- '@attr 1=' . $services{$service}->{attrs}->{$_}->{code} . # add the use attribute
- ' @attr 4=' . $services{$service}->{attrs}->{$_}->{format} . # add the structure attribute
- " \"" . $$hash{$_} . "\" "; # add the search term
+ 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}){
+ $str .= ' @attr 5=' . $services{$service}->{attrs}->{$_}->{truncation};
+ }
+ $str .= " \"" . $$hash{$_} . "\" "; # add the search term
}
return $str;
}
More information about the open-ils-commits
mailing list