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 <gmc@esilibrary.com>
This commit is contained in:
Galen Charlton 2013-10-10 22:46:18 +00:00
parent c1a289a191
commit 9f6999bfdb
1 changed files with 1 additions and 7 deletions

View File

@ -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');