Bugzilla – Attachment 49625 Details for
Bug 16154
Replace CGI->param with CGI->multi_param in list context
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16154: CGI->multi_param - Manual changes
Bug-16154-CGI-multiparam---Manual-changes.patch (text/plain), 5.74 KB, created by
Jonathan Druart
on 2016-03-29 09:28:06 UTC
(
hide
)
Description:
Bug 16154: CGI->multi_param - Manual changes
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-03-29 09:28:06 UTC
Size:
5.74 KB
patch
obsolete
>From 8326a4ce4486a207b6532c5692675c3f743f7558 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 29 Mar 2016 09:41:58 +0100 >Subject: [PATCH] Bug 16154: CGI->multi_param - Manual changes > >This patch does the same as the previous one, but affects lines which >have not been caught by the regex. >--- > C4/Biblio.pm | 2 +- > catalogue/itemsearch.pl | 4 ++-- > catalogue/search.pl | 10 +++++----- > opac/ilsdi.pl | 2 +- > opac/opac-image.pl | 2 +- > serials/serials-search.pl | 2 +- > svc/import_bib | 2 +- > 7 files changed, 12 insertions(+), 12 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index 188870c..5c046e6 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -2511,7 +2511,7 @@ sub _default_ind_to_space { > sub TransformHtmlToMarc { > my ($cgi, $isbiblio) = @_; > >- my @params = $cgi->param(); >+ my @params = $cgi->multi_param(); > > # explicitly turn on the UTF-8 flag for all > # 'tag_' parameters to avoid incorrect character >diff --git a/catalogue/itemsearch.pl b/catalogue/itemsearch.pl >index ff614e2..dade645 100755 >--- a/catalogue/itemsearch.pl >+++ b/catalogue/itemsearch.pl >@@ -43,7 +43,7 @@ if (defined $format and $format eq 'json') { > # Map DataTables parameters with 'regular' parameters > $cgi->param('rows', $cgi->param('iDisplayLength')); > $cgi->param('page', ($cgi->param('iDisplayStart') / $cgi->param('iDisplayLength')) + 1); >- my @columns = split /,/, $cgi->param('sColumns'); >+ my @columns = split /,/, $cgi->multi_param('sColumns'); > $cgi->param('sortby', $columns[ $cgi->param('iSortCol_0') ]); > $cgi->param('sortorder', $cgi->param('sSortDir_0')); > >@@ -102,7 +102,7 @@ if (scalar keys %params > 0) { > }; > > foreach my $p (qw(homebranch location itype ccode issues datelastborrowed notforloan)) { >- if (my @q = $cgi->param($p)) { >+ if (my @q = $cgi->multi_param($p)) { > if ($q[0] ne '') { > my $f = { > field => $p, >diff --git a/catalogue/search.pl b/catalogue/search.pl >index d30eede..1c9a4fd 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -400,11 +400,11 @@ unless (@servers) { > } > # operators include boolean and proximity operators and are used > # to evaluate multiple operands >-my @operators = map uri_unescape($_), $cgi->param('op'); >+my @operators = map uri_unescape($_), $cgi->multi_param('op'); > > # indexes are query qualifiers, like 'title', 'author', etc. They > # can be single or multiple parameters separated by comma: kw,right-Truncation >-my @indexes = map uri_unescape($_), $cgi->param('idx'); >+my @indexes = map uri_unescape($_), $cgi->multi_param('idx'); > > # if a simple index (only one) display the index used in the top search box > if ($indexes[0] && (!$indexes[1] || $params->{'scan'})) { >@@ -414,11 +414,11 @@ if ($indexes[0] && (!$indexes[1] || $params->{'scan'})) { > } > > # an operand can be a single term, a phrase, or a complete ccl query >-my @operands = map uri_unescape($_), $cgi->param('q'); >+my @operands = map uri_unescape($_), $cgi->multi_param('q'); > > # limits are use to limit to results to a pre-defined category such as branch or language >-my @limits = map uri_unescape($_), $cgi->param('limit'); >-my @nolimits = map uri_unescape($_), $cgi->param('nolimit'); >+my @limits = map uri_unescape($_), $cgi->multi_param('limit'); >+my @nolimits = map uri_unescape($_), $cgi->multi_param('nolimit'); > my %is_nolimit = map { $_ => 1 } @nolimits; > @limits = grep { not $is_nolimit{$_} } @limits; > >diff --git a/opac/ilsdi.pl b/opac/ilsdi.pl >index 76a3483..727da73 100755 >--- a/opac/ilsdi.pl >+++ b/opac/ilsdi.pl >@@ -171,7 +171,7 @@ if ( $service and any { $service eq $_ } @services ) { > my @parmsrequired = @{ $required{$service} }; > my @parmsoptional = @{ $optional{$service} }; > my @parmsall = ( @parmsrequired, @parmsoptional ); >- my @names = $cgi->param; >+ my @names = $cgi->multi_param; > my %paramhash; > $paramhash{$_} = 1 for @names; > >diff --git a/opac/opac-image.pl b/opac/opac-image.pl >index 8e627b1..0318aa0 100755 >--- a/opac/opac-image.pl >+++ b/opac/opac-image.pl >@@ -64,7 +64,7 @@ if ( C4::Context->preference("OPACLocalCoverImages") ) { > $imagenumber = $data->param('imagenumber'); > } > elsif ( defined $data->param('biblionumber') ) { >- my @imagenumbers = ListImagesForBiblio( $data->param('biblionumber') ); >+ my @imagenumbers = ListImagesForBiblio( scalar $data->param('biblionumber') ); > if (@imagenumbers) { > $imagenumber = $imagenumbers[0]; > } >diff --git a/serials/serials-search.pl b/serials/serials-search.pl >index 3e73c56..4bac9b5 100755 >--- a/serials/serials-search.pl >+++ b/serials/serials-search.pl >@@ -53,7 +53,7 @@ my $location = $query->param('location_filter') || ''; > my $expiration_date = $query->param('expiration_date_filter') || ''; > my $routing = $query->param('routing') || C4::Context->preference("RoutingSerials"); > my $searched = $query->param('searched') || 0; >-my @subscriptionids = $query ->param('subscriptionid'); >+my @subscriptionids = $query->multi_param('subscriptionid'); > my $op = $query->param('op'); > > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( >diff --git a/svc/import_bib b/svc/import_bib >index b02e5f2..a23b72d 100755 >--- a/svc/import_bib >+++ b/svc/import_bib >@@ -44,7 +44,7 @@ if ($query->request_method eq "POST") { > $xml = $query->param('xml'); > } > if ($xml) { >- my %params = map { $_ => $query->param($_) } $query->param; >+ my %params = map { $_ => scalar $query->param($_) } $query->param; > my $result = import_bib($xml, \%params ); > print $query->header(-type => 'text/xml'); > print XMLout($result, NoAttr => 1, RootName => 'response', XMLDecl => 1); >-- >2.7.0
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 16154
:
49624
|
49625
|
49626
|
49627
|
50175
|
50176
|
50203
|
50204
|
50205
|
50206
|
50207
|
50229
|
50644
|
50645
|
50646
|
50647
|
50648
|
50752
|
50753
|
50754
|
50755
|
50756
|
50757
|
50758
|
50759
|
50760
|
50761