From e7b1d92f41fb181e4e47c898c51f62c30af4f8f3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 12 Feb 2016 11:49:28 +0000 Subject: [PATCH] Bug 14076: Do not use CGI->param in list context - opac-authorities-home.pl MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit See bug 15809 for more info on why we should not use CGI->param in list context. Note: I have not found any places where several values for the same params are passed to this script but, just in case, this patch won't change this ability. Test plan: Do an authority search at the OPAC Test with several values of the form. Confirm that the results are always the same before and after this patch. Signed-off-by: Mark Tompsett Signed-off-by: Marcel de Rooy Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com (cherry picked from commit 3fa2b10150a9ea2db2897be1246cba3785c55e55) Signed-off-by: Julian Maurice (cherry picked from commit 182838a54498b4a00a4077779458cf005f5ec444) Signed-off-by: Frédéric Demians --- opac/opac-authorities-home.pl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/opac/opac-authorities-home.pl b/opac/opac-authorities-home.pl index 54c144411f..fc4e71b508 100755 --- a/opac/opac-authorities-home.pl +++ b/opac/opac-authorities-home.pl @@ -59,12 +59,13 @@ foreach my $thisauthtype ( } if ( $op eq "do_search" ) { - my @marclist = ($query->param('marclist')); - my @and_or = ($query->param('and_or')); - my @excluding = ($query->param('excluding'),); - my @operator = ($query->param('operator')); + my @marclist = $query->multi_param('marclist'); + my @and_or = $query->multi_param('and_or'); + my @excluding = $query->multi_param('excluding'); + my @operator = $query->multi_param('operator'); my $orderby = $query->param('orderby'); - my @value = ($query->param('value') || "",); + my @value = $query->multi_param('value'); + $value[0] ||= q||; $resultsperpage = $query->param('resultsperpage'); $resultsperpage = 20 if ( !defined $resultsperpage ); -- 2.11.4.GIT