From 9f6999bfdb12d2dd19c454a6b54a58a3f7a6490d Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 10 Oct 2013 22:46:18 +0000 Subject: [PATCH] Bug 9282: (follow-up) remove log noise caused by authorities/ysearch.pl This patch (which is incidental to the main patches for bug 9282), improves the AJAX authority search code by fixing incorrect contruction of the parameters to SearchAuthorities() that led to errors like this in the Apache log when doing auto-completion searches on "main entry" and "anywhere" in the authority finder: ysearch.pl: Use of uninitialized value $i in string eq ... In the process, this patch also removes a use of the now-deprecated Perl smartmatch operator. To test: [1] Verify that the main test plan for bug 9282 still works. Signed-off-by: Galen Charlton --- authorities/ysearch.pl | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/authorities/ysearch.pl b/authorities/ysearch.pl index 7996c6d4dd..b669c08f33 100755 --- a/authorities/ysearch.pl +++ b/authorities/ysearch.pl @@ -48,14 +48,8 @@ if ( $auth_status ne "ok" ) { exit 0; } - my $searchstr = $query->param('term'); + my @value = $query->param('term'); my $searchtype = $query->param('querytype'); - my @value; - given ($searchtype) { - when (/^marclist$/) { @value = (undef, undef, $searchstr); } - when (/^mainentry$/) { @value = (undef, $searchstr, undef); } - when (/^mainmainentry$/) { @value = ($searchstr, undef, undef); } - } my @marclist = ($searchtype); my $authtypecode = $query->param('authtypecode'); my @and_or = $query->param('and_or'); -- 2.39.5