From: Fridolyn SOMERS Date: Fri, 16 Aug 2013 13:10:56 +0000 (+0200) Subject: Bug 10742: improve converting simple search to Z39.50 search X-Git-Tag: v3.14.00-alpha1~298 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=0ab71d32641d092d11228f0e2282dd8805198720;p=koha-ffzg.git Bug 10742: improve converting simple search to Z39.50 search In intranet, when search does not return results, there is a button to perform the same search on Z39.50 servers. This works well when coming from advanced search. But when using simple search from header, in the Z39.50 search box "kw,wrdl" is added to the operand in title. This patch simply adds kw as default value when the cgi does not have idx parameter. Test plan : - In intranet, perform a search from header that does not return any result. For example "afalseword" - Click on "Z39.50 Search" => you get a popup with the searched word in title. For example: Title: afalseword - Go to advanced search page - Enter the same word into first input and submit - Click on "Z39.50 Search" => you get a popup with the searched word in title. Signed-off-by: David Cook Signed-off-by: Katrin Fischer Small change, fixes an annoying problem. Signed-off-by: Galen Charlton --- diff --git a/catalogue/search.pl b/catalogue/search.pl index 09707ef7e6..9e81a81144 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -452,7 +452,7 @@ my $indexes2z3950 = { }; for (my $ii = 0; $ii < @operands; ++$ii) { - my $name = $indexes2z3950->{$indexes[$ii]}; + my $name = $indexes2z3950->{$indexes[$ii] || 'kw'}; if (defined $name && defined $operands[$ii]) { $z3950par ||= {};