[open-ils-commits] r8237 -
trunk/Open-ILS/src/perlmods/OpenILS/Application/Search
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Dec 19 18:12:53 EST 2007
Author: miker
Date: 2007-12-19 17:51:14 -0500 (Wed, 19 Dec 2007)
New Revision: 8237
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm
Log:
make z search more robust when using multi-target search
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm 2007-12-19 22:21:37 UTC (rev 8236)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm 2007-12-19 22:51:14 UTC (rev 8237)
@@ -324,13 +324,10 @@
# "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
+ " \"" . $$hash{$_} . "\" "; # add the search term
}
return $str;
}
More information about the open-ils-commits
mailing list