Bugzilla – Attachment 49584 Details for
Bug 14076
Noisy warns in opac-authorities-home.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14076: Do not use CGI->param in list context - opac-authorities-home.pl
Bug-14076-Do-not-use-CGI-param-in-list-context---o.patch (text/plain), 1.92 KB, created by
Marcel de Rooy
on 2016-03-25 09:46:34 UTC
(
hide
)
Description:
Bug 14076: Do not use CGI->param in list context - opac-authorities-home.pl
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-03-25 09:46:34 UTC
Size:
1.92 KB
patch
obsolete
>From 05e2c8bb438a159ad144fb4614ffb715d84f4c9d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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 >Content-Type: text/plain; charset=utf-8 > >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 <mtompset@hotmail.com> >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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 f4ab2ab..d37df85 100755 >--- a/opac/opac-authorities-home.pl >+++ b/opac/opac-authorities-home.pl >@@ -47,12 +47,13 @@ my $resultsperpage; > my $authority_types = Koha::Authority::Types->search({}, { order_by => ['authtypetext']}); > > 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 ); >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14076
:
39157
|
47967
|
48047
| 49584