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.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2016-03-29 09:41:58 +01:00 committed by Brendan Gallagher
parent 66aacace08
commit ac5a1bfece
7 changed files with 12 additions and 12 deletions

View File

@ -2516,7 +2516,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

View File

@ -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,

View File

@ -381,11 +381,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'})) {
@ -395,11 +395,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;

View File

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

View File

@ -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];
}

View File

@ -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(

View File

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