Browse Source

Bug 16154: CGI->multi_param - Declare a list

This patch replaces the occurrences of
  my @foo = $cgi->param('foo');
with
  my @foo = $cgi->multi_param('foo');

perl -p -i -e
's/^(\s*my\s*@\w+\s*=\s*)\$(cgi|input|query)\->param\(/$1\$$2\->multi_param\(/xms'
**/*.pl

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>
16.05.x
Jonathan Druart 7 years ago
committed by Brendan Gallagher
parent
commit
66aacace08
  1. 14
      acqui/addorder.pl
  2. 26
      acqui/addorderiso2709.pl
  3. 2
      acqui/basketgroup.pl
  4. 2
      acqui/check_duplicate_barcode_ajax.pl
  5. 4
      acqui/check_uniqueness.pl
  6. 14
      acqui/finishreceive.pl
  7. 2
      acqui/histsearch.pl
  8. 2
      acqui/invoice.pl
  9. 2
      acqui/lateorders-export.pl
  10. 2
      acqui/lateorders.pl
  11. 2
      acqui/z3950_search.pl
  12. 4
      admin/aqplan.pl
  13. 2
      admin/audio_alerts.pl
  14. 20
      admin/auth_subfields_structure.pl
  15. 2
      admin/columns_settings.pl
  16. 26
      admin/marc_subfields_structure.pl
  17. 8
      admin/oai_set_mappings.pl
  18. 4
      admin/oai_sets.pl
  19. 2
      admin/patron-attr-types.pl
  20. 10
      authorities/auth_finder.pl
  21. 10
      authorities/authorities.pl
  22. 2
      authorities/merge.pl
  23. 8
      authorities/ysearch.pl
  24. 18
      catalogue/itemsearch.pl
  25. 4
      catalogue/search.pl
  26. 2
      cataloguing/addbiblio.pl
  27. 2
      cataloguing/addbooks.pl
  28. 20
      cataloguing/additem.pl
  29. 2
      cataloguing/merge.pl
  30. 10
      cataloguing/value_builder/unimarc_field_210c.pl
  31. 2
      cataloguing/z3950_auth_search.pl
  32. 2
      cataloguing/z3950_search.pl
  33. 4
      circ/circulation.pl
  34. 2
      course_reserves/mod_course.pl
  35. 2
      members/member-flags.pl
  36. 2
      members/memberentry.pl
  37. 2
      opac/ilsdi.pl
  38. 2
      opac/opac-account-pay-paypal-return.pl
  39. 2
      opac/opac-account-pay.pl
  40. 2
      opac/opac-renew.pl
  41. 4
      opac/opac-search-history.pl
  42. 18
      opac/opac-search.pl
  43. 2
      opac/opac-shelves.pl
  44. 2
      opac/opac-suggestions.pl
  45. 4
      patron_lists/list.pl
  46. 4
      patroncards/create-pdf.pl
  47. 2
      patroncards/image-manage.pl
  48. 6
      patroncards/print.pl
  49. 2
      reports/acquisitions_stats.pl
  50. 2
      reports/bor_issues_top.pl
  51. 2
      reports/borrowers_out.pl
  52. 2
      reports/borrowers_stats.pl
  53. 2
      reports/cat_issues_top.pl
  54. 2
      reports/catalogue_out.pl
  55. 2
      reports/catalogue_stats.pl
  56. 4
      reports/dictionary.pl
  57. 14
      reports/guided_reports.pl
  58. 2
      reports/issues_avg_stats.pl
  59. 2
      reports/issues_stats.pl
  60. 2
      reports/manager.pl
  61. 14
      reserve/modrequest.pl
  62. 6
      reserve/placerequest.pl
  63. 2
      serials/claims.pl
  64. 2
      serials/lateissues-export.pl
  65. 2
      serials/serials-collection.pl
  66. 34
      serials/serials-edit.pl
  67. 4
      serials/subscription-add.pl
  68. 2
      suggestion/suggestion.pl
  69. 10
      tools/automatic_item_modification_by_age.pl
  70. 14
      tools/batchMod.pl
  71. 2
      tools/batch_delete_records.pl
  72. 2
      tools/batch_record_modification.pl
  73. 6
      tools/export.pl
  74. 2
      tools/koha-news.pl
  75. 6
      tools/letter.pl
  76. 8
      tools/modborrowers.pl
  77. 4
      tools/overduerules.pl
  78. 4
      tools/viewlog.pl
  79. 2
      virtualshelves/addbybiblionumber.pl
  80. 2
      virtualshelves/shelves.pl

14
acqui/addorder.pl

@ -280,13 +280,13 @@ if ( $orderinfo->{quantity} ne '0' ) {
# now, add items if applicable
if (C4::Context->preference('AcqCreateItem') eq 'ordering') {
my @tags = $input->param('tag');
my @subfields = $input->param('subfield');
my @field_values = $input->param('field_value');
my @serials = $input->param('serial');
my @itemid = $input->param('itemid');
my @ind_tag = $input->param('ind_tag');
my @indicator = $input->param('indicator');
my @tags = $input->multi_param('tag');
my @subfields = $input->multi_param('subfield');
my @field_values = $input->multi_param('field_value');
my @serials = $input->multi_param('serial');
my @itemid = $input->multi_param('itemid');
my @ind_tag = $input->multi_param('ind_tag');
my @indicator = $input->multi_param('indicator');
#Rebuilding ALL the data for items into a hash
# parting them on $itemid.

26
acqui/addorderiso2709.pl

@ -133,13 +133,13 @@ if ($op eq ""){
my $biblios = GetImportRecordsRange($import_batch_id);
my $duplinbatch;
my $imported = 0;
my @import_record_id_selected = $input->param("import_record_id");
my @quantities = $input->param('quantity');
my @prices = $input->param('price');
my @budgets_id = $input->param('budget_id');
my @discount = $input->param('discount');
my @sort1 = $input->param('sort1');
my @sort2 = $input->param('sort2');
my @import_record_id_selected = $input->multi_param("import_record_id");
my @quantities = $input->multi_param('quantity');
my @prices = $input->multi_param('price');
my @budgets_id = $input->multi_param('budget_id');
my @discount = $input->multi_param('discount');
my @sort1 = $input->multi_param('sort1');
my @sort2 = $input->multi_param('sort2');
my $active_currency = Koha::Acquisition::Currencies->get_active;
for my $biblio (@$biblios){
# Check if this import_record_id was selected
@ -239,12 +239,12 @@ if ($op eq ""){
# parse the item sent by the form, and create an item just for the import_record_id we are dealing with
# this is not optimised, but it's working !
if ( C4::Context->preference('AcqCreateItem') eq 'ordering' ) {
my @tags = $input->param('tag');
my @subfields = $input->param('subfield');
my @field_values = $input->param('field_value');
my @serials = $input->param('serial');
my @ind_tag = $input->param('ind_tag');
my @indicator = $input->param('indicator');
my @tags = $input->multi_param('tag');
my @subfields = $input->multi_param('subfield');
my @field_values = $input->multi_param('field_value');
my @serials = $input->multi_param('serial');
my @ind_tag = $input->multi_param('ind_tag');
my @indicator = $input->multi_param('indicator');
my $item;
push @{ $item->{tags} }, $tags[0];
push @{ $item->{subfields} }, $subfields[0];

2
acqui/basketgroup.pl

@ -340,7 +340,7 @@ if ( $op eq "add" ) {
#
# Getting parameters
my $basketgroup = {};
my @baskets = $input->param('basket');
my @baskets = $input->multi_param('basket');
my $basketgroupid = $input->param('basketgroupid');
my $basketgroupname = $input->param('basketgroupname');
my $booksellerid = $input->param('booksellerid');

2
acqui/check_duplicate_barcode_ajax.pl

@ -41,7 +41,7 @@ if ($auth_status ne "ok") {
my $json;
#Check if the barcodes already exist.
my @barcodes = $input->param('barcodes');
my @barcodes = $input->multi_param('barcodes');
foreach my $barcode (@barcodes) {
my $existing_itemnumber = GetItemnumberFromBarcode($barcode);
if ($existing_itemnumber) {

4
acqui/check_uniqueness.pl

@ -37,8 +37,8 @@ use C4::Output;
use C4::Items;
my $input = new CGI;
my @field = $input->param('field[]');
my @value = $input->param('value[]');
my @field = $input->multi_param('field[]');
my @value = $input->multi_param('value[]');
my $r = {};
my $i = 0;

14
acqui/finishreceive.pl

@ -122,13 +122,13 @@ if ($quantityrec > $origquantityrec ) {
# now, add items if applicable
if (C4::Context->preference('AcqCreateItem') eq 'receiving') {
my @tags = $input->param('tag');
my @subfields = $input->param('subfield');
my @field_values = $input->param('field_value');
my @serials = $input->param('serial');
my @itemid = $input->param('itemid');
my @ind_tag = $input->param('ind_tag');
my @indicator = $input->param('indicator');
my @tags = $input->multi_param('tag');
my @subfields = $input->multi_param('subfield');
my @field_values = $input->multi_param('field_value');
my @serials = $input->multi_param('serial');
my @itemid = $input->multi_param('itemid');
my @ind_tag = $input->multi_param('ind_tag');
my @indicator = $input->multi_param('indicator');
#Rebuilding ALL the data for items into a hash
# parting them on $itemid.
my %itemhash;

2
acqui/histsearch.pl

@ -74,7 +74,7 @@ my $budget = $input->param( 'budget' );
my $orderstatus = $input->param( 'orderstatus' );
my $ordernumber = $input->param( 'ordernumber' );
my $search_children_too = $input->param( 'search_children_too' );
my @created_by = $input->param('created_by');
my @created_by = $input->multi_param('created_by');
my $from_placed_on = eval { dt_from_string( $input->param('from') ) } || dt_from_string;
my $to_placed_on = eval { dt_from_string( $input->param('to') ) } || dt_from_string;

2
acqui/invoice.pl

@ -92,7 +92,7 @@ elsif ( $op && $op eq 'mod' ) {
} elsif ($input->param('close')) {
CloseInvoice($invoiceid);
} elsif ($input->param('merge')) {
my @sources = $input->param('merge');
my @sources = $input->multi_param('merge');
MergeInvoices($invoiceid, \@sources);
defined($invoice_files) && $invoice_files->MergeFileRecIds(@sources);
}

2
acqui/lateorders-export.pl

@ -31,7 +31,7 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user({
authnotrequired => 0,
flagsrequired => {acquisition => 'order_receive'},
});
my @ordernumbers = $input->param('ordernumber');
my @ordernumbers = $input->multi_param('ordernumber');
my @orders;
for my $ordernumber ( @ordernumbers ) {

2
acqui/lateorders.pl

@ -103,7 +103,7 @@ if ( $delay and not $delay =~ /^\d{1,3}$/ ) {
}
if ($op and $op eq "send_alert"){
my @ordernums = $input->param("ordernumber");# FIXME: Fallback values?
my @ordernums = $input->multi_param("ordernumber");# FIXME: Fallback values?
my $err;
eval {
$err = SendAlerts( 'claimacquisition', \@ordernums, $input->param("letter_code") ); # FIXME: Fallback value?

2
acqui/z3950_search.pl

@ -110,7 +110,7 @@ if ( $op ne "do_search" ) {
exit;
}
my @id = $input->param('id');
my @id = $input->multi_param('id');
if (@id==0) {
$template->param( emptyserverlist => 1 );
output_html_with_http_headers $input, $cookie, $template->output;

4
admin/aqplan.pl

@ -96,7 +96,7 @@ my $del = $input->param("sep");
my $show_mine = $input->param('show_mine') ;
my @hide_cols = $input->param('hide_cols');
my @hide_cols = $input->multi_param('hide_cols');
if ( $budget_period_locked == 1 && not defined $show_actual ) {
$show_actual = 1;
@ -141,7 +141,7 @@ my @budgets = @$budgets_ref;
my @authvals;
my %labels;
my @names = $input->param();
my @names = $input->multi_param();
# ------------------------------------------------------------
if ( $op eq 'save' ) {
#get budgets

2
admin/audio_alerts.pl

@ -32,7 +32,7 @@ my $sound = $cgi->param('sound');
my $id = $cgi->param('id');
my $action = $cgi->param('action');
my $where = $cgi->param('where');
my @delete = $cgi->param('delete');
my @delete = $cgi->multi_param('delete');
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{

20
admin/auth_subfields_structure.pl

@ -192,18 +192,18 @@ if ($op eq 'add_form') {
values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
my $sth_update = $dbh->prepare("update auth_subfield_structure set authtypecode=?, tagfield=?, tagsubfield=?, liblibrarian=?, libopac=?, repeatable=?, mandatory=?, kohafield=?, tab=?, seealso=?, authorised_value=?, frameworkcode=?, value_builder=?, hidden=?, isurl=?, defaultvalue=?
where authtypecode=? and tagfield=? and tagsubfield=?");
my @tagsubfield = $input->param('tagsubfield');
my @liblibrarian = $input->param('liblibrarian');
my @libopac = $input->param('libopac');
my @tagsubfield = $input->multi_param('tagsubfield');
my @liblibrarian = $input->multi_param('liblibrarian');
my @libopac = $input->multi_param('libopac');
my @kohafield = ''.$input->param('kohafield');
my @tab = $input->param('tab');
my @seealso = $input->param('seealso');
my @ohidden = $input->param('ohidden');
my @authorised_values = $input->param('authorised_value');
my @tab = $input->multi_param('tab');
my @seealso = $input->multi_param('seealso');
my @ohidden = $input->multi_param('ohidden');
my @authorised_values = $input->multi_param('authorised_value');
my $authtypecode = $input->param('authtypecode');
my @frameworkcodes = $input->param('frameworkcode');
my @value_builder =$input->param('value_builder');
my @defaultvalue = $input->param('defaultvalue');
my @frameworkcodes = $input->multi_param('frameworkcode');
my @value_builder =$input->multi_param('value_builder');
my @defaultvalue = $input->multi_param('defaultvalue');
for (my $i=0; $i<= $#tagsubfield ; $i++) {
my $tagfield =$input->param('tagfield');
my $tagsubfield =$tagsubfield[$i];

2
admin/columns_settings.pl

@ -24,7 +24,7 @@ my $action = $input->param('action') // 'list';
if ( $action eq 'save' ) {
my $module = $input->param('module');
my @columnids = $input->param("columnid");
my @columnids = $input->multi_param("columnid");
my @columns;
for my $columnid (@columnids) {
next unless $columnid =~ m|^([^#]*)#([^#]*)#(.*)$|;

26
admin/marc_subfields_structure.pl

@ -249,19 +249,19 @@ elsif ( $op eq 'add_validate' ) {
update marc_subfield_structure set tagfield=?, tagsubfield=?, liblibrarian=?, libopac=?, repeatable=?, mandatory=?, kohafield=?, tab=?, seealso=?, authorised_value=?, authtypecode=?, value_builder=?, hidden=?, isurl=?, frameworkcode=?, link=?, defaultvalue=?, maxlength=?
where tagfield=? and tagsubfield=? and frameworkcode=?
});
my @tagsubfield = $input->param('tagsubfield');
my @liblibrarian = $input->param('liblibrarian');
my @libopac = $input->param('libopac');
my @kohafield = $input->param('kohafield');
my @tab = $input->param('tab');
my @seealso = $input->param('seealso');
my @hidden = $input->param('hidden');
my @authorised_values = $input->param('authorised_value');
my @authtypecodes = $input->param('authtypecode');
my @value_builder = $input->param('value_builder');
my @link = $input->param('link');
my @defaultvalue = $input->param('defaultvalue');
my @maxlength = $input->param('maxlength');
my @tagsubfield = $input->multi_param('tagsubfield');
my @liblibrarian = $input->multi_param('liblibrarian');
my @libopac = $input->multi_param('libopac');
my @kohafield = $input->multi_param('kohafield');
my @tab = $input->multi_param('tab');
my @seealso = $input->multi_param('seealso');
my @hidden = $input->multi_param('hidden');
my @authorised_values = $input->multi_param('authorised_value');
my @authtypecodes = $input->multi_param('authtypecode');
my @value_builder = $input->multi_param('value_builder');
my @link = $input->multi_param('link');
my @defaultvalue = $input->multi_param('defaultvalue');
my @maxlength = $input->multi_param('maxlength');
for ( my $i = 0 ; $i <= $#tagsubfield ; $i++ ) {
my $tagfield = $input->param('tagfield');

8
admin/oai_set_mappings.pl

@ -53,10 +53,10 @@ my $id = $input->param('id');
my $op = $input->param('op');
if($op && $op eq "save") {
my @marcfields = $input->param('marcfield');
my @marcsubfields = $input->param('marcsubfield');
my @operators = $input->param('operator');
my @marcvalues = $input->param('marcvalue');
my @marcfields = $input->multi_param('marcfield');
my @marcsubfields = $input->multi_param('marcsubfield');
my @operators = $input->multi_param('operator');
my @marcvalues = $input->multi_param('marcvalue');
my @mappings;
my $i = 0;

4
admin/oai_sets.pl

@ -52,7 +52,7 @@ if($op && $op eq "new") {
} elsif($op && $op eq "savenew") {
my $spec = $input->param('spec');
my $name = $input->param('name');
my @descriptions = $input->param('description');
my @descriptions = $input->multi_param('description');
AddOAISet({
spec => $spec,
name => $name,
@ -72,7 +72,7 @@ if($op && $op eq "new") {
my $id = $input->param('id');
my $spec = $input->param('spec');
my $name = $input->param('name');
my @descriptions = $input->param('description');
my @descriptions = $input->multi_param('description');
ModOAISet({
id => $id,
spec => $spec,

2
admin/patron-attr-types.pl

@ -168,7 +168,7 @@ sub add_update_attribute_type {
$attr_type->display_checkout($display_checkout);
$attr_type->category_code($input->param('category_code'));
$attr_type->class($input->param('class'));
my @branches = $input->param('branches');
my @branches = $input->multi_param('branches');
$attr_type->branches( \@branches );
if ($op eq 'edit') {

10
authorities/auth_finder.pl

@ -55,10 +55,10 @@ my $authority_types = Koha::Authority::Types->search( {}, { order_by => ['authty
# If search form posted
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 @value = (
$query->param('value_mainstr') || undef,
$query->param('value_main') || undef,
@ -84,7 +84,7 @@ if ( $op eq "do_search" ) {
my @field_data = ();
# get marclist again, as the previous one has been modified by catalogsearch (mainentry replaced by field name)
my @marclist_ini = $query->param('marclist');
my @marclist_ini = $query->multi_param('marclist');
for ( my $i = 0 ; $i <= $#marclist ; $i++ ) {
push @field_data, { term => "marclist", val => $marclist_ini[$i] };
push @field_data, { term => "and_or", val => $and_or[$i] };

10
authorities/authorities.pl

@ -606,12 +606,12 @@ $op ||= q{};
if ($op eq "add") {
#------------------------------------------------------------------------------------------------------------------------------
# rebuild
my @tags = $input->param('tag');
my @subfields = $input->param('subfield');
my @values = $input->param('field_value');
my @tags = $input->multi_param('tag');
my @subfields = $input->multi_param('subfield');
my @values = $input->multi_param('field_value');
# build indicator hash.
my @ind_tag = $input->param('ind_tag');
my @indicator = $input->param('indicator');
my @ind_tag = $input->multi_param('ind_tag');
my @indicator = $input->multi_param('indicator');
my $record = TransformHtmlToMarc($input, 0);
my ($duplicateauthid,$duplicateauthvalue);

2
authorities/merge.pl

@ -28,7 +28,7 @@ use C4::Koha;
use C4::Biblio;
my $input = new CGI;
my @authid = $input->param('authid');
my @authid = $input->multi_param('authid');
my $merge = $input->param('merge');
my @errors;

8
authorities/ysearch.pl

@ -48,13 +48,13 @@ if ( $auth_status ne "ok" ) {
exit 0;
}
my @value = $query->param('term');
my @value = $query->multi_param('term');
my $searchtype = $query->param('querytype');
my @marclist = ($searchtype);
my $authtypecode = $query->param('authtypecode');
my @and_or = $query->param('and_or');
my @excluding = $query->param('excluding');
my @operator = $query->param('operator');
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 $resultsperpage = 50;

18
catalogue/itemsearch.pl

@ -47,11 +47,11 @@ if (defined $format and $format eq 'json') {
$cgi->param('sortby', $columns[ $cgi->param('iSortCol_0') ]);
$cgi->param('sortorder', $cgi->param('sSortDir_0'));
my @f = $cgi->param('f');
my @q = $cgi->param('q');
my @f = $cgi->multi_param('f');
my @q = $cgi->multi_param('q');
push @q, '' if @q == 0;
my @op = $cgi->param('op');
my @c = $cgi->param('c');
my @op = $cgi->multi_param('op');
my @c = $cgi->multi_param('c');
foreach my $i (0 .. ($cgi->param('iColumns') - 1)) {
my $sSearch = $cgi->param("sSearch_$i");
if (defined $sSearch and $sSearch ne '') {
@ -116,10 +116,10 @@ if (scalar keys %params > 0) {
}
}
my @c = $cgi->param('c');
my @fields = $cgi->param('f');
my @q = $cgi->param('q');
my @op = $cgi->param('op');
my @c = $cgi->multi_param('c');
my @fields = $cgi->multi_param('f');
my @q = $cgi->multi_param('q');
my @op = $cgi->multi_param('op');
my $f;
for (my $i = 0; $i < @fields; $i++) {
@ -232,7 +232,7 @@ if (scalar keys %params > 0) {
my $url = '/cgi-bin/koha/catalogue/itemsearch.pl';
my @params;
foreach my $p (keys %params) {
my @v = $cgi->param($p);
my @v = $cgi->multi_param($p);
push @params, map { "$p=" . $_ } @v;
}
$url .= '?' . join ('&', @params);

4
catalogue/search.pl

@ -168,7 +168,7 @@ my $cgi = new CGI;
# decide which template to use
my $template_name;
my $template_type;
my @params = $cgi->param("limit");
my @params = $cgi->multi_param("limit");
if ((@params>=1) || ($cgi->param("q")) || ($cgi->param('multibranchlimit')) || ($cgi->param('limit-yr')) ) {
$template_name = 'catalogue/results.tt';
}
@ -373,7 +373,7 @@ foreach my $sort (@sort_by) {
$template->param('sort_by' => $sort_by[0]);
# Use the servers defined, or just search our local catalog(default)
my @servers = $cgi->param('server');
my @servers = $cgi->multi_param('server');
unless (@servers) {
#FIXME: this should be handled using Context.pm
@servers = ("biblioserver");

2
cataloguing/addbiblio.pl

@ -833,7 +833,7 @@ if ( $op eq "addbiblio" ) {
biblionumberdata => $biblionumber,
);
# getting html input
my @params = $input->param();
my @params = $input->multi_param();
$record = TransformHtmlToMarc( $input, 1 );
# check for a duplicate
my ( $duplicatebiblionumber, $duplicatetitle );

2
cataloguing/addbooks.pl

@ -41,7 +41,7 @@ my $input = new CGI;
my $success = $input->param('biblioitem');
my $query = $input->param('q');
my @value = $input->param('value');
my @value = $input->multi_param('value');
my $page = $input->param('page') || 1;
my $results_per_page = 20;

20
cataloguing/additem.pl

@ -429,12 +429,12 @@ if ($op eq "additem") {
#-------------------------------------------------------------------------------
# rebuild
my @tags = $input->param('tag');
my @subfields = $input->param('subfield');
my @values = $input->param('field_value');
my @tags = $input->multi_param('tag');
my @subfields = $input->multi_param('subfield');
my @values = $input->multi_param('field_value');
# build indicator hash.
my @ind_tag = $input->param('ind_tag');
my @indicator = $input->param('indicator');
my @ind_tag = $input->multi_param('ind_tag');
my @indicator = $input->multi_param('indicator');
my $xml = TransformHtmlToXml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag, 'ITEM');
my $record = MARC::Record::new_from_xml($xml, 'UTF-8');
@ -671,12 +671,12 @@ if ($op eq "additem") {
} elsif ($op eq "saveitem") {
#-------------------------------------------------------------------------------
# rebuild
my @tags = $input->param('tag');
my @subfields = $input->param('subfield');
my @values = $input->param('field_value');
my @tags = $input->multi_param('tag');
my @subfields = $input->multi_param('subfield');
my @values = $input->multi_param('field_value');
# build indicator hash.
my @ind_tag = $input->param('ind_tag');
my @indicator = $input->param('indicator');
my @ind_tag = $input->multi_param('ind_tag');
my @indicator = $input->multi_param('indicator');
# my $itemnumber = $input->param('itemnumber');
my $xml = TransformHtmlToXml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag,'ITEM');
my $itemtosave=MARC::Record::new_from_xml($xml, 'UTF-8');

2
cataloguing/merge.pl

@ -32,7 +32,7 @@ use C4::Acquisition qw/ModOrder GetOrdersByBiblionumber/;
use Koha::MetadataRecord;
my $input = new CGI;
my @biblionumbers = $input->param('biblionumber');
my @biblionumbers = $input->multi_param('biblionumber');
my $merge = $input->param('merge');
my @errors;

10
cataloguing/value_builder/unimarc_field_210c.pl

@ -70,11 +70,11 @@ my ($input) = @_;
my $resultsperpage;
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 @value = $query->param('value');
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 @value = $query->multi_param('value');
my $orderby = $query->param('orderby');
$resultsperpage= $query->param('resultsperpage');

2
cataloguing/z3950_auth_search.pl

@ -77,7 +77,7 @@ if ( $op ne "do_search" ) {
exit;
}
my @id = $input->param('id');
my @id = $input->multi_param('id');
if ( @id==0 ) {
# empty server list -> report and exit
$template->param( emptyserverlist => 1 );

2
cataloguing/z3950_search.pl

@ -90,7 +90,7 @@ if ( $op ne "do_search" ) {
exit;
}
my @id = $input->param('id');
my @id = $input->multi_param('id');
if ( @id==0 ) {
# empty server list -> report and exit
$template->param( emptyserverlist => 1 );

4
circ/circulation.pl

@ -147,11 +147,11 @@ if (!C4::Auth::haspermission( C4::Context->userenv->{id} , { circulate => 'force
my $onsite_checkout = $query->param('onsite_checkout');
my @failedrenews = $query->param('failedrenew'); # expected to be itemnumbers
my @failedrenews = $query->multi_param('failedrenew'); # expected to be itemnumbers
our %renew_failed = ();
for (@failedrenews) { $renew_failed{$_} = 1; }
my @failedreturns = $query->param('failedreturn');
my @failedreturns = $query->multi_param('failedreturn');
our %return_failed = ();
for (@failedreturns) { $return_failed{$_} = 1; }

2
course_reserves/mod_course.pl

@ -59,7 +59,7 @@ if ( $action eq 'del' ) {
my $course_id = ModCourse(%params);
my @instructors = $cgi->param('instructors');
my @instructors = $cgi->multi_param('instructors');
ModCourseInstructors(
mode => 'replace',
cardnumbers => \@instructors,

2
members/member-flags.pl

@ -43,7 +43,7 @@ $member2{'borrowernumber'}=$member;
if ($input->param('newflags')) {
my $dbh=C4::Context->dbh();
my @perms = $input->param('flag');
my @perms = $input->multi_param('flag');
my %all_module_perms = ();
my %sub_perms = ();
foreach my $perm (@perms) {

2
members/memberentry.pl

@ -102,7 +102,7 @@ my $userenv = C4::Context->userenv;
## Deal with debarments
$template->param(
debarments => GetDebarments( { borrowernumber => $borrowernumber } ) );
my @debarments_to_remove = $input->param('remove_debarment');
my @debarments_to_remove = $input->multi_param('remove_debarment');
foreach my $d ( @debarments_to_remove ) {
DelDebarment( $d );
}

2
opac/ilsdi.pl

@ -199,7 +199,7 @@ if ( $service and any { $service eq $_ } @services ) {
# check for multiple parameters
for ( @names ) {
my @values = $cgi->param($_);
my @values = $cgi->multi_param($_);
if ( $#values != 0 ) {
$out->{'code'} = "MultipleValuesNotAllowed";
$out->{'message'} = "Multiple values not allowed for the parameter ".$_.".";

2
opac/opac-account-pay-paypal-return.pl

@ -55,7 +55,7 @@ my $active_currency = Koha::Acquisition::Currencies->get_active;
my $token = $cgi->param('token');
my $payer_id = $cgi->param('PayerID');
my $amount = $cgi->param('amount');
my @accountlines = $cgi->param('accountlines');
my @accountlines = $cgi->multi_param('accountlines');
my $ua = LWP::UserAgent->new;

2
opac/opac-account-pay.pl

@ -50,7 +50,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
);
my $payment_method = $cgi->param('payment_method');
my @accountlines = $cgi->param('accountline');
my @accountlines = $cgi->multi_param('accountline');
my $amount_to_pay =
Koha::Database->new()->schema()->resultset('Accountline')->search( { accountlines_id => { -in => \@accountlines } } )

2
opac/opac-renew.pl

@ -42,7 +42,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
debug => 1,
}
);
my @items = $query->param('item');
my @items = $query->multi_param('item');
my $opacrenew = C4::Context->preference("OpacRenewalAllowed");

4
opac/opac-search-history.pl

@ -55,7 +55,7 @@ unless ( $loggedinuser ) {
# Deleting search history
if ( $action eq 'delete') {
# Deleting session's search history
my @id = $cgi->param('id');
my @id = $cgi->multi_param('id');
my $all = not scalar( @id );
my $type = $cgi->param('type');
@ -99,7 +99,7 @@ unless ( $loggedinuser ) {
# Deleting search history
if ( $action eq 'delete' ) {
my @id = $cgi->param('id');
my @id = $cgi->multi_param('id');
if ( @id ) {
C4::Search::History::delete(
{

18
opac/opac-search.pl

@ -96,8 +96,8 @@ my ($template,$borrowernumber,$cookie);
# decide which template to use
my $template_name;
my $template_type = 'basic';
my @params = $cgi->param("limit");
my @searchCategories = $cgi->param('searchcat');
my @params = $cgi->multi_param("limit");
my @searchCategories = $cgi->multi_param('searchcat');
my $format = $cgi->param("format") || '';
my $build_grouped_results = C4::Context->preference('OPACGroupResults');
@ -404,7 +404,7 @@ if ( $params->{tag} ) {
my $pasarParams = '';
my $j = 0;
for (keys %$params) {
my @pasarParam = $cgi->param($_);
my @pasarParam = $cgi->multi_param($_);
for my $paramValue(@pasarParam) {
$pasarParams .= '&amp;' if ($j > 0);
$pasarParams .= $_ . '=' . uri_escape_utf8($paramValue);
@ -435,7 +435,7 @@ foreach my $sort (@sort_by) {
$template->param('sort_by' => $sort_by[0]);
# Use the servers defined, or just search our local catalog(default)
my @servers = $cgi->param('server');
my @servers = $cgi->multi_param('server');
unless (@servers) {
#FIXME: this should be handled using Context.pm
@servers = ("biblioserver");
@ -444,12 +444,12 @@ unless (@servers) {
# operators include boolean and proximity operators and are used
# to evaluate multiple operands
my @operators = $cgi->param('op');
my @operators = $cgi->multi_param('op');
@operators = map { uri_unescape($_) } @operators;
# indexes are query qualifiers, like 'title', 'author', etc. They
# can be single or multiple parameters separated by comma: kw,right-Truncation
my @indexes = $cgi->param('idx');
my @indexes = $cgi->multi_param('idx');
@indexes = map { uri_unescape($_) } @indexes;
# if a simple index (only one) display the index used in the top search box
@ -457,7 +457,7 @@ if ($indexes[0] && !$indexes[1]) {
$template->param("ms_".$indexes[0] => 1);
}
# an operand can be a single term, a phrase, or a complete ccl query
my @operands = $cgi->param('q');
my @operands = $cgi->multi_param('q');
@operands = map { uri_unescape($_) } @operands;
$template->{VARS}->{querystring} = join(' ', @operands);
@ -470,9 +470,9 @@ if ($operands[0] && !$operands[1]) {
}
# limits are use to limit to results to a pre-defined category such as branch or language
my @limits = $cgi->param('limit');
my @limits = $cgi->multi_param('limit');
@limits = map { uri_unescape($_) } @limits;
my @nolimits = $cgi->param('nolimit');
my @nolimits = $cgi->multi_param('nolimit');
@nolimits = map { uri_unescape($_) } @nolimits;
my %is_nolimit = map { $_ => 1 } @nolimits;
@limits = grep { not $is_nolimit{$_} } @limits;

2
opac/opac-shelves.pl

@ -188,7 +188,7 @@ if ( $op eq 'add_form' ) {
} elsif ( $op eq 'remove_biblios' ) {
$shelfnumber = $query->param('shelfnumber');
$shelf = Koha::Virtualshelves->find($shelfnumber);
my @biblionumber = $query->param('biblionumber');
my @biblionumber = $query->multi_param('biblionumber');
if ($shelf) {
if ( $shelf->can_biblios_be_removed( $loggedinuser ) ) {
my $number_of_biblios_removed = eval {

2
opac/opac-suggestions.pl

@ -142,7 +142,7 @@ if ( $op eq "add_confirm" ) {
}
if ( $op eq "delete_confirm" ) {
my @delete_field = $input->param("delete_field");
my @delete_field = $input->multi_param("delete_field");
foreach my $delete_field (@delete_field) {
&DelSuggestion( $borrowernumber, $delete_field );
}

4
patron_lists/list.pl

@ -40,12 +40,12 @@ my ( $template, $logged_in_user, $cookie ) = get_template_and_user(
my ($list) =
GetPatronLists( { patron_list_id => $cgi->param('patron_list_id') } );
my @patrons_to_add = $cgi->param('patrons_to_add');
my @patrons_to_add = $cgi->multi_param('patrons_to_add');
if (@patrons_to_add) {
AddPatronsToList( { list => $list, cardnumbers => \@patrons_to_add } );
}
my @patrons_to_remove = $cgi->param('patrons_to_remove');
my @patrons_to_remove = $cgi->multi_param('patrons_to_remove');
if (@patrons_to_remove) {
DelPatronsFromList( { list => $list, patron_list_patrons => \@patrons_to_remove } );
}

4
patroncards/create-pdf.pl

@ -51,8 +51,8 @@ my $batch_id = $cgi->param('batch_id') if $cgi->param('batch_id');
my $template_id = $cgi->param('template_id') || undef;
my $layout_id = $cgi->param('layout_id') || undef;
my $start_card = $cgi->param('start_card') || 1;
my @label_ids = $cgi->param('label_id') if $cgi->param('label_id');
my @borrower_numbers = $cgi->param('borrower_number') if $cgi->param('borrower_number');
my @label_ids = $cgi->multi_param('label_id') if $cgi->param('label_id');
my @borrower_numbers = $cgi->multi_param('borrower_number') if $cgi->param('borrower_number');
my $patronlist_id = $cgi->param('patronlist_id');
my $items = undef; # items = cards

2
patroncards/image-manage.pl

@ -30,7 +30,7 @@ my $image_name = $cgi->param('image_name') || '';
my $file_name = $cgi->param('uploadfile') || '';
my $upload_file = $cgi->upload('uploadfile') || '';
my $op = $cgi->param('op') || 'none';
my @image_ids = $cgi->param('image_id') if $cgi->param('image_id');
my @image_ids = $cgi->multi_param('image_id') if $cgi->param('image_id');
my $source_file = "$file_name"; # otherwise we end up with what amounts to a pointer to a filehandle rather than a user-friendly filename

6
patroncards/print.pl

@ -41,13 +41,13 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
);
my $op = $cgi->param('op') || 'none';
my @label_ids = $cgi->param('label_id') if $cgi->param('label_id'); # this will handle individual card printing; we use label_id to maintain consistency with the column names in the creator_batches table
my @batch_ids = $cgi->param('batch_id') if $cgi->param('batch_id');
my @label_ids = $cgi->multi_param('label_id') if $cgi->param('label_id'); # this will handle individual card printing; we use label_id to maintain consistency with the column names in the creator_batches table
my @batch_ids = $cgi->multi_param('batch_id') if $cgi->param('batch_id');
my $patronlist_id = $cgi->param('patronlist_id') || undef;
my $layout_id = $cgi->param('layout_id') || undef;
my $template_id = $cgi->param('template_id') || undef;
my $start_card = $cgi->param('start_card') || 1;
my @borrower_numbers = $cgi->param('borrower_number') if $cgi->param('borrower_number');
my @borrower_numbers = $cgi->multi_param('borrower_number') if $cgi->param('borrower_number');
my $output_format = $cgi->param('output_format') || 'pdf';
my $referer = $cgi->param('referer') || undef;

2
reports/acquisitions_stats.pl

@ -45,7 +45,7 @@ my $do_it = $input->param('do_it');
my $fullreportname = "reports/acquisitions_stats.tt";
my $line = $input->param("Line");
my $column = $input->param("Column");
my @filters = $input->param("Filter");
my @filters = $input->multi_param("Filter");
$filters[0] = eval { output_pref( { dt => dt_from_string( $filters[0]), dateonly => 1, dateformat => 'iso' } ); }
if ( $filters[0] );
$filters[1] = eval { output_pref( { dt => dt_from_string( $filters[1]), dateonly => 1, dateformat => 'iso' } ); }

2
reports/bor_issues_top.pl

@ -49,7 +49,7 @@ my $fullreportname = "reports/bor_issues_top.tt";
my $do_it = $input->param('do_it');
my $limit = $input->param("Limit");
my $column = $input->param("Criteria");
my @filters = $input->param("Filter");
my @filters = $input->multi_param("Filter");
foreach ( @filters[0..3] ) {
$_ and $_ = eval { output_pref( { dt => dt_from_string ( $_ ), dateonly => 1, dateformat => 'iso' }); };
}

2
reports/borrowers_out.pl

@ -45,7 +45,7 @@ my $do_it=$input->param('do_it');
my $fullreportname = "reports/borrowers_out.tt";
my $limit = $input->param("Limit");
my $column = $input->param("Criteria");
my @filters = $input->param("Filter");
my @filters = $input->multi_param("Filter");
$filters[1] = eval { output_pref( { dt => dt_from_string( $filters[1]), dateonly => 1, dateformat => 'iso' } ); }
if ( $filters[1] );

2
reports/borrowers_stats.pl

@ -49,7 +49,7 @@ my $do_it=$input->param('do_it');
my $fullreportname = "reports/borrowers_stats.tt";
my $line = $input->param("Line");
my $column = $input->param("Column");
my @filters = $input->param("Filter");
my @filters = $input->multi_param("Filter");
$filters[3] = eval { output_pref( { dt => dt_from_string( $filters[3]), dateonly => 1, dateformat => 'iso' } ); }
if ( $filters[3] );
$filters[4] = eval { output_pref ({ dt => dt_from_string( $filters[4]), dateonly => 1, dateformat => 'iso' } ); }

2
reports/cat_issues_top.pl

@ -46,7 +46,7 @@ my $do_it=$input->param('do_it');
my $fullreportname = "reports/cat_issues_top.tt";
my $limit = $input->param("Limit");
my $column = $input->param("Criteria");
my @filters = $input->param("Filter");
my @filters = $input->multi_param("Filter");
foreach ( @filters[0..3] ) {
$_ and $_ = eval { output_pref( { dt => dt_from_string ( $_ ), dateonly => 1, dateformat => 'iso' } ); };
}

2
reports/catalogue_out.pl

@ -40,7 +40,7 @@ my $input = new CGI;
my $do_it = $input->param('do_it');
my $limit = $input->param("Limit") || 10;
my $column = $input->param("Criteria");
my @filters = $input->param("Filter");
my @filters = $input->multi_param("Filter");
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
{

2
reports/catalogue_stats.pl

@ -47,7 +47,7 @@ my $do_it = $input->param('do_it');
my $line = $input->param("Line");
my $column = $input->param("Column");
my $cellvalue = $input->param("Cellvalue"); # one of 'items', 'biblios', 'deleteditems'
my @filters = $input->param("Filter");
my @filters = $input->multi_param("Filter");
my $cotedigits = $input->param("cotedigits");
my $output = $input->param("output");
my $basename = $input->param("basename");

4
reports/dictionary.pl

@ -92,7 +92,7 @@ elsif ( $phase eq 'New Term step 3' ) {
elsif ( $phase eq 'New Term step 4' ) {
# Choosing the values
my @columns = $input->param('columns');
my @columns = $input->multi_param('columns');
my $columnstring = join( ',', @columns );
my @column_loop;
foreach my $column (@columns) {
@ -130,7 +130,7 @@ elsif ( $phase eq 'New Term step 4' ) {
elsif ( $phase eq 'New Term step 5' ) {
# Confirmation screen
my $columnstring = $input->param('columnstring');
my @criteria = $input->param('criteria_column');
my @criteria = $input->multi_param('criteria_column');
my $query_criteria;
my @criteria_loop;

14
reports/guided_reports.pl

@ -116,7 +116,7 @@ elsif ( $phase eq 'Build new' ) {
}
elsif ( $phase eq 'Delete Multiple') {
my @ids = $input->param('ids');
my @ids = $input->multi_param('ids');
delete_report( @ids );
print $input->redirect("/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved");
exit;
@ -320,7 +320,7 @@ elsif ( $phase eq 'Choose these columns' ) {
# next step is the constraints
my $area = $input->param('area');
my $type = $input->param('type');
my @columns = $input->param('columns');
my @columns = $input->multi_param('columns');
my $column = join( ',', @columns );
$template->param(
@ -345,9 +345,9 @@ elsif ( $phase eq 'Choose these criteria' ) {
my $area = $input->param('area');
my $type = $input->param('type');
my $column = $input->param('column');
my @definitions = $input->param('definition');
my @definitions = $input->multi_param('definition');
my $definition = join (',',@definitions);
my @criteria = $input->param('criteria_column');
my @criteria = $input->multi_param('criteria_column');
my $query_criteria;
foreach my $crit (@criteria) {
my $value = $input->param( $crit . "_value" );
@ -427,7 +427,7 @@ elsif ( $phase eq 'Choose these operations' ) {
my $column = $input->param('column');
my $criteria = $input->param('criteria');
my $definition = $input->param('definition');
my @total_by = $input->param('total_by');
my @total_by = $input->multi_param('total_by');
my $totals;
foreach my $total (@total_by) {
my $value = $input->param( $total . "_tvalue" );
@ -474,7 +474,7 @@ elsif ( $phase eq 'Build report' ) {
my $query_criteria=$crit;
# split the columns up by ,
my @columns = split( ',', $column );
my @order_by = $input->param('order_by');
my @order_by = $input->multi_param('order_by');
my $query_orderby;
foreach my $order (@order_by) {
@ -621,7 +621,7 @@ elsif ($phase eq 'Run this report'){
my $limit = $input->param('limit') || 20;
my $offset = 0;
my $report_id = $input->param('reports');
my @sql_params = $input->param('sql_params');
my @sql_params = $input->multi_param('sql_params');
# offset algorithm
if ($input->param('page')) {
$offset = ($input->param('page') - 1) * $limit;

2
reports/issues_avg_stats.pl

@ -46,7 +46,7 @@ my $do_it=$input->param('do_it');
my $fullreportname = "reports/issues_avg_stats.tt";
my $line = $input->param("Line");
my $column = $input->param("Column");
my @filters = $input->param("Filter");
my @filters = $input->multi_param("Filter");
$filters[0] = eval { output_pref( { dt => dt_from_string( $filters[0]), dateonly => 1, dateformat => 'iso' } ); }
if ( $filters[0] );
$filters[1] = eval { output_pref( { dt => dt_from_string( $filters[1]), dateonly => 1, dateformat => 'iso' } ); }

2
reports/issues_stats.pl

@ -50,7 +50,7 @@ my $fullreportname = "reports/issues_stats.tt";
my $do_it = $input->param('do_it');
my $line = $input->param("Line");
my $column = $input->param("Column");
my @filters = $input->param("Filter");
my @filters = $input->multi_param("Filter");
$filters[0] = eval { output_pref( { dt => dt_from_string( $filters[0]), dateonly => 1, dateformat => 'iso' } ); }
if ( $filters[0] );
$filters[1] = eval { output_pref( { dt => dt_from_string( $filters[1]), dateonly => 1, dateformat => 'iso' } ); }

2
reports/manager.pl

@ -30,7 +30,7 @@ my $input = new CGI;
my $report_name=$input->param("report_name");
my $do_it=$input->param('do_it');
my $fullreportname = "reports/".$report_name.".tt";
my @values = $input->param("value");
my @values = $input->multi_param("value");
my ($template, $borrowernumber, $cookie)
= get_template_and_user({template_name => $fullreportname,
query => $input,

14
reserve/modrequest.pl

@ -41,13 +41,13 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
}
);
my @reserve_id = $query->param('reserve_id');
my @rank = $query->param('rank-request');
my @biblionumber = $que