From 4e5751843b29d650a38b81cd8c4136e0de17ea56 Mon Sep 17 00:00:00 2001 From: miker Date: Wed, 19 Dec 2007 22:51:14 +0000 Subject: [PATCH] make z search more robust when using multi-target search git-svn-id: svn://svn.open-ils.org/ILS/trunk@8237 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm index fb26e4fe7f..c49bd45314 100755 --- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm @@ -324,13 +324,10 @@ sub compile_query { # "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; } -- 2.11.0