Bugzilla – Attachment 50175 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 - Force scalar context
Bug-16154-CGI-multiparam---Force-scalar-context.patch (text/plain), 63.04 KB, created by
Jonathan Druart
on 2016-04-13 08:24:34 UTC
(
hide
)
Description:
Bug 16154: CGI->multi_param - Force scalar context
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-04-13 08:24:34 UTC
Size:
63.04 KB
patch
obsolete
>From 0607248ddac512a3d50332690040c3f1124322b1 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 29 Mar 2016 09:51:07 +0100 >Subject: [PATCH] Bug 16154: CGI->multi_param - Force scalar context > >This patch replaces the occurrences of > $template->param( foo => $cgi->param('foo') ); >with > $template->param( foo => scalar $cgi->param('foo') ); > >perl -p -i -e 's/(\s*=>\s*)\$(cgi|input|query)\->param\(/$1scalar >\$$2\->param\(/xms' **/*.pl >--- > acqui/invoice-files.pl | 4 +- > acqui/invoice.pl | 4 +- > admin/aqbudgetperiods.pl | 2 +- > admin/aqbudgets.pl | 2 +- > admin/aqcontract.pl | 14 +++---- > admin/authorised_values.pl | 4 +- > admin/branches.pl | 4 +- > admin/categories.pl | 2 +- > admin/patron-attr-types.pl | 6 +-- > admin/z3950servers.pl | 2 +- > authorities/auth_finder.pl | 16 ++++---- > catalogue/ISBDdetail.pl | 2 +- > catalogue/MARCdetail.pl | 2 +- > catalogue/detail.pl | 2 +- > catalogue/itemsearch.pl | 6 +-- > catalogue/labeledMARCdetail.pl | 2 +- > cataloguing/addbiblio.pl | 2 +- > cataloguing/additem.pl | 2 +- > cataloguing/merge.pl | 2 +- > cataloguing/plugin_launcher.pl | 2 +- > cataloguing/value_builder/EXAMPLE.pl | 4 +- > .../value_builder/marc21_linking_section.pl | 6 +-- > cataloguing/value_builder/unimarc_field_210c.pl | 2 +- > cataloguing/value_builder/unimarc_field_4XX.pl | 6 +-- > cataloguing/z3950_auth_search.pl | 2 +- > circ/circulation.pl | 2 +- > circ/returns.pl | 4 +- > circ/selectbranchprinter.pl | 2 +- > course_reserves/add_items.pl | 14 +++---- > course_reserves/course-details.pl | 2 +- > labels/label-edit-layout.pl | 14 +++---- > labels/label-edit-profile.pl | 14 +++---- > labels/label-edit-template.pl | 36 ++++++++--------- > members/files.pl | 4 +- > members/member.pl | 6 +-- > members/memberentry.pl | 2 +- > members/mod_debarment.pl | 2 +- > members/moremember.pl | 2 +- > members/nl-search.pl | 42 ++++++++++---------- > members/paycollect.pl | 2 +- > opac/opac-account.pl | 8 ++-- > opac/opac-review.pl | 2 +- > opac/opac-search.pl | 2 +- > opac/opac-serial-issues.pl | 4 +- > opac/opac-shelves.pl | 2 +- > opac/opac-topissues.pl | 2 +- > opac/opac-user.pl | 2 +- > patron_lists/list.pl | 2 +- > patroncards/edit-profile.pl | 14 +++---- > patroncards/edit-template.pl | 32 +++++++-------- > reports/guided_reports.pl | 40 +++++++++---------- > serials/serial-issues.pl | 2 +- > serials/serials-collection.pl | 2 +- > serials/showpredictionpattern.pl | 46 +++++++++++----------- > serials/subscription-add.pl | 16 ++++---- > serials/subscription-renew.pl | 2 +- > virtualshelves/shelves.pl | 2 +- > 57 files changed, 215 insertions(+), 215 deletions(-) > >diff --git a/acqui/invoice-files.pl b/acqui/invoice-files.pl >index 635c427..ce674e4 100755 >--- a/acqui/invoice-files.pl >+++ b/acqui/invoice-files.pl >@@ -102,7 +102,7 @@ else { > name => $filename, > type => $mimetype, > content => $file_content, >- description => $input->param('description') >+ description => scalar $input->param('description') > ); > } > } >@@ -110,7 +110,7 @@ else { > $errors{'no_file'} = 1; > } > } elsif ( $op eq 'delete' ) { >- $mf->DelFile( id => $input->param('file_id') ); >+ $mf->DelFile( id => scalar $input->param('file_id') ); > } > > $template->param( >diff --git a/acqui/invoice.pl b/acqui/invoice.pl >index ab01a14..08e3ee8 100755 >--- a/acqui/invoice.pl >+++ b/acqui/invoice.pl >@@ -82,8 +82,8 @@ elsif ( $op && $op eq 'mod' ) { > my $shipment_budget_id = $input->param('shipment_budget_id'); > ModInvoice( > invoiceid => $invoiceid, >- shipmentdate => output_pref( { str => $input->param('shipmentdate'), dateformat => 'iso', dateonly => 1 } ), >- billingdate => output_pref( { str => $input->param('billingdate'), dateformat => 'iso', dateonly => 1 } ), >+ shipmentdate => output_pref( { str => scalar $input->param('shipmentdate'), dateformat => 'iso', dateonly => 1 } ), >+ billingdate => output_pref( { str => scalar $input->param('billingdate'), dateformat => 'iso', dateonly => 1 } ), > shipmentcost => $shipmentcost, > shipmentcost_budgetid => $shipment_budget_id > ); >diff --git a/admin/aqbudgetperiods.pl b/admin/aqbudgetperiods.pl >index 2800a98..a6bf3b4 100755 >--- a/admin/aqbudgetperiods.pl >+++ b/admin/aqbudgetperiods.pl >@@ -71,7 +71,7 @@ my $op = $input->param('op')||"else"; > > # get only the columns of aqbudgetperiods in budget_period_hashref > my @columns = Koha::Database->new()->schema->source('Aqbudgetperiod')->columns; >-my $budget_period_hashref = { map { join(' ',@columns) =~ /$_/ ? ( $_ => $input->param($_) ) : () } keys( %{$input->Vars()} ) } ; >+my $budget_period_hashref = { map { join(' ',@columns) =~ /$_/ ? ( $_ => scalar $input->param($_) ) : () } keys( %{$input->Vars()} ) } ; > $budget_period_hashref->{budget_period_startdate} = dt_from_string( $input->param('budget_period_startdate') ); > $budget_period_hashref->{budget_period_enddate} = dt_from_string( $input->param('budget_period_enddate') ); > >diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl >index 0d18131..0e6b744 100755 >--- a/admin/aqbudgets.pl >+++ b/admin/aqbudgets.pl >@@ -69,7 +69,7 @@ if (not defined $template->{VARS}->{'CAN_user_acquisition_budget_add_del'} > > # get only the columns of aqbudgets in budget_hash > my @columns = Koha::Database->new()->schema->source('Aqbudget')->columns; >-my $budget_hash = { map { join(' ',@columns) =~ /$_/ ? ( $_ => $input->param($_) ) : () } keys( %{$input->Vars()}) } ; >+my $budget_hash = { map { join(' ',@columns) =~ /$_/ ? ( $_ => scalar $input->param($_) ) : () } keys( %{$input->Vars()}) } ; > > my $budget_id = $input->param('budget_id'); > my $budget_period_id = $input->param('budget_period_id'); >diff --git a/admin/aqcontract.pl b/admin/aqcontract.pl >index a191cd8..dfe0fc0 100755 >--- a/admin/aqcontract.pl >+++ b/admin/aqcontract.pl >@@ -105,16 +105,16 @@ elsif ( $op eq 'add_validate' ) { > ModContract({ > contractstartdate => eval { output_pref({ dt => dt_from_string( $contractstart_dt ), dateformat => 'iso', dateonly => 1 } ); }, > contractenddate => eval { output_pref({ dt => dt_from_string( $contractend_dt ), dateformat => 'iso', dateonly => 1 } ); }, >- contractname => $input->param('contractname'), >- contractdescription => $input->param('contractdescription'), >- booksellerid => $input->param('booksellerid'), >- contractnumber => $input->param('contractnumber'), >+ contractname => scalar $input->param('contractname'), >+ contractdescription => scalar $input->param('contractdescription'), >+ booksellerid => scalar $input->param('booksellerid'), >+ contractnumber => scalar $input->param('contractnumber'), > }); > } else { > AddContract({ >- contractname => $input->param('contractname'), >- contractdescription => $input->param('contractdescription'), >- booksellerid => $input->param('booksellerid'), >+ contractname => scalar $input->param('contractname'), >+ contractdescription => scalar $input->param('contractdescription'), >+ booksellerid => scalar $input->param('booksellerid'), > contractstartdate => eval { output_pref({ dt => dt_from_string( $input->param('contractstartdate') ), dateformat => 'iso', dateonly => 1 } ); }, > contractenddate => eval { output_pref({ dt => dt_from_string( $input->param('contractenddate') ), dateformat => 'iso', dateonly => 1 } ); }, > }); >diff --git a/admin/authorised_values.pl b/admin/authorised_values.pl >index 0f00126..c7085dc 100755 >--- a/admin/authorised_values.pl >+++ b/admin/authorised_values.pl >@@ -135,8 +135,8 @@ if ($op eq 'add_form') { > my $av = Koha::AuthorisedValue->new( { > category => $new_category, > authorised_value => $new_authorised_value, >- lib => $input->param('lib') || undef, >- lib_opac => $input->param('lib_opac') || undef, >+ lib => scalar $input->param('lib') || undef, >+ lib_opac => scalar $input->param('lib_opac') || undef, > imageurl => $imageurl, > } ); > >diff --git a/admin/branches.pl b/admin/branches.pl >index 6031f2f..3626b67 100755 >--- a/admin/branches.pl >+++ b/admin/branches.pl >@@ -101,7 +101,7 @@ if ( $op eq 'add_form' ) { > $branchcode =~ s|\s||g; > my $library = Koha::Library->new( > { branchcode => $branchcode, >- ( map { $_ => $input->param($_) || undef } @fields ) >+ ( map { $_ => scalar $input->param($_) || undef } @fields ) > } > ); > eval { $library->store; }; >@@ -180,7 +180,7 @@ if ( $op eq 'add_form' ) { > } else { > my $category = Koha::LibraryCategory->new( > { categorycode => $categorycode, >- ( map { $_ => $input->param($_) || undef } @fields ) >+ ( map { $_ => scalar $input->param($_) || undef } @fields ) > } > ); > $category->show_in_pulldown( $input->param('show_in_pulldown') eq 'on' ); >diff --git a/admin/categories.pl b/admin/categories.pl >index e439a62..f160e6e 100755 >--- a/admin/categories.pl >+++ b/admin/categories.pl >@@ -154,7 +154,7 @@ elsif ( $op eq 'add_validate' ) { > > if ( C4::Context->preference('EnhancedMessagingPreferences') ) { > C4::Form::MessagingPreferences::handle_form_action( $input, >- { categorycode => $input->param('categorycode') }, $template ); >+ { categorycode => scalar $input->param('categorycode') }, $template ); > } > > $searchfield = q||; >diff --git a/admin/patron-attr-types.pl b/admin/patron-attr-types.pl >index 91e081d..a80da68 100755 >--- a/admin/patron-attr-types.pl >+++ b/admin/patron-attr-types.pl >@@ -105,7 +105,7 @@ sub add_attribute_type_form { > sub error_add_attribute_type_form { > my $template = shift; > >- $template->param(description => $input->param('description')); >+ $template->param(description => scalar $input->param('description')); > > if ($input->param('repeatable')) { > $template->param(repeatable_checked => 1); >@@ -126,8 +126,8 @@ sub error_add_attribute_type_form { > $template->param(display_checkout_checked => 'checked="checked"'); > } > >- $template->param( category_code => $input->param('category_code') ); >- $template->param( class => $input->param('class') ); >+ $template->param( category_code => scalar $input->param('category_code') ); >+ $template->param( class => scalar $input->param('class') ); > > $template->param( > attribute_type_form => 1, >diff --git a/admin/z3950servers.pl b/admin/z3950servers.pl >index df4b99a..d1fe85b 100755 >--- a/admin/z3950servers.pl >+++ b/admin/z3950servers.pl >@@ -115,5 +115,5 @@ sub ServerSearch { #find server(s) by id or name > > sub _form_data_hashref { > my ( $input, $fieldref ) = @_; >- return { map { ( $_ => $input->param($_)//'' ) } @$fieldref }; >+ return { map { ( $_ => scalar $input->param($_)//'' ) } @$fieldref }; > } >diff --git a/authorities/auth_finder.pl b/authorities/auth_finder.pl >index 2966342..b484f03 100755 >--- a/authorities/auth_finder.pl >+++ b/authorities/auth_finder.pl >@@ -93,13 +93,13 @@ if ( $op eq "do_search" ) { > } > > push @field_data, >- { term => "value_mainstr", val => $query->param('value_mainstr') || "" }; >+ { term => "value_mainstr", val => scalar $query->param('value_mainstr') || "" }; > push @field_data, >- { term => "value_main", val => $query->param('value_main') || "" }; >+ { term => "value_main", val => scalar $query->param('value_main') || "" }; > push @field_data, >- { term => "value_any", val => $query->param('value_any') || "" }; >+ { term => "value_any", val => scalar $query->param('value_any') || "" }; > push @field_data, >- { term => "value_match", val => $query->param('value_match') || "" }; >+ { term => "value_match", val => scalar $query->param('value_match') || "" }; > > my @numbers = (); > if ( $total > $resultsperpage ) { >@@ -158,10 +158,10 @@ else { > > $template->param( > op => $op, >- value_mainstr => $query->param('value_mainstr') || '', >- value_main => $query->param('value_main') || '', >- value_any => $query->param('value_any') || '', >- value_match => $query->param('value_match') || '', >+ value_mainstr => scalar $query->param('value_mainstr') || '', >+ value_main => scalar $query->param('value_main') || '', >+ value_any => scalar $query->param('value_any') || '', >+ value_match => scalar $query->param('value_match') || '', > tagid => $tagid, > index => $index, > authority_types => $authority_types, >diff --git a/catalogue/ISBDdetail.pl b/catalogue/ISBDdetail.pl >index 6aa2cee..37c739c 100755 >--- a/catalogue/ISBDdetail.pl >+++ b/catalogue/ISBDdetail.pl >@@ -110,7 +110,7 @@ $template->param ( > z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)), > ocoins => GetCOinSBiblio($record), > C4::Search::enabled_staff_search_views, >- searchid => $query->param('searchid'), >+ searchid => scalar $query->param('searchid'), > ); > > my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber); >diff --git a/catalogue/MARCdetail.pl b/catalogue/MARCdetail.pl >index 0aff184..ccf178e 100755 >--- a/catalogue/MARCdetail.pl >+++ b/catalogue/MARCdetail.pl >@@ -316,7 +316,7 @@ $template->param ( > marcview => 1, > z3950_search_params => C4::Search::z3950_search_args($biblio), > C4::Search::enabled_staff_search_views, >- searchid => $query->param('searchid'), >+ searchid => scalar $query->param('searchid'), > ); > > my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber); >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 23d6d04..55fcab9 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -392,7 +392,7 @@ $template->param( > subscriptions => \@subs, > subscriptionsnumber => $subscriptionsnumber, > subscriptiontitle => $dat->{title}, >- searchid => $query->param('searchid'), >+ searchid => scalar $query->param('searchid'), > ); > > # $debug and $template->param(debug_display => 1); >diff --git a/catalogue/itemsearch.pl b/catalogue/itemsearch.pl >index dade645..2e6608b 100755 >--- a/catalogue/itemsearch.pl >+++ b/catalogue/itemsearch.pl >@@ -189,10 +189,10 @@ if (scalar keys %params > 0) { > $sortby = 'copyrightdate'; > } > my $search_params = { >- rows => $cgi->param('rows') // 20, >- page => $cgi->param('page') || 1, >+ rows => scalar $cgi->param('rows') // 20, >+ page => scalar $cgi->param('page') || 1, > sortby => $sortby, >- sortorder => $cgi->param('sortorder') || 'asc', >+ sortorder => scalar $cgi->param('sortorder') || 'asc', > }; > > my ($results, $total_rows) = SearchItems($filter, $search_params); >diff --git a/catalogue/labeledMARCdetail.pl b/catalogue/labeledMARCdetail.pl >index c5366e1..8ad2d22 100755 >--- a/catalogue/labeledMARCdetail.pl >+++ b/catalogue/labeledMARCdetail.pl >@@ -114,7 +114,7 @@ $template->param ( > labeledmarcview => 1, > z3950_search_params => C4::Search::z3950_search_args($biblio), > C4::Search::enabled_staff_search_views, >- searchid => $query->param('searchid'), >+ searchid => scalar $query->param('searchid'), > ); > > my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber); >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index 57a0083..f0263ef 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -982,7 +982,7 @@ $template->param( > frameworkcode => $frameworkcode, > itemtype => $frameworkcode, > borrowernumber => $loggedinuser, >- tab => $input->param('tab') >+ tab => scalar $input->param('tab') > ); > $template->{'VARS'}->{'searchid'} = $searchid; > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index 72618e5..28fd247 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -919,7 +919,7 @@ $template->param( > itemtagsubfield => $itemtagsubfield, > op => $nextop, > opisadd => ($nextop eq "saveitem") ? 0 : 1, >- popup => $input->param('popup') ? 1: 0, >+ popup => scalar $input->param('popup') ? 1: 0, > C4::Search::enabled_staff_search_views, > ); > $template->{'VARS'}->{'searchid'} = $searchid; >diff --git a/cataloguing/merge.pl b/cataloguing/merge.pl >index 54a937d..09517ed 100755 >--- a/cataloguing/merge.pl >+++ b/cataloguing/merge.pl >@@ -178,7 +178,7 @@ if ($merge) { > result => 1, > report_records => \@report_records, > report_header => $report_header, >- ref_biblionumber => $input->param('ref_biblionumber') >+ ref_biblionumber => scalar $input->param('ref_biblionumber') > ); > > #------------------------- >diff --git a/cataloguing/plugin_launcher.pl b/cataloguing/plugin_launcher.pl >index 72e9c15..601784c 100755 >--- a/cataloguing/plugin_launcher.pl >+++ b/cataloguing/plugin_launcher.pl >@@ -24,6 +24,6 @@ use Koha::FrameworkPlugin; > > my $input = new CGI; > my $plugin= Koha::FrameworkPlugin->new( { >- name => $input->param("plugin_name"), >+ name => scalar $input->param("plugin_name"), > }); > $plugin->launch({ cgi => $input }); >diff --git a/cataloguing/value_builder/EXAMPLE.pl b/cataloguing/value_builder/EXAMPLE.pl >index 28590a1..61204e9 100644 >--- a/cataloguing/value_builder/EXAMPLE.pl >+++ b/cataloguing/value_builder/EXAMPLE.pl >@@ -120,8 +120,8 @@ my $launcher= sub { > flagsrequired => {editcatalogue => '*'}, > }); > $template->param( >- index => $cgi->param('index'), >- result => $cgi->param('result'), >+ index => scalar $cgi->param('index'), >+ result => scalar $cgi->param('result'), > ); > output_html_with_http_headers $cgi, $cookie, $template->output; > }; >diff --git a/cataloguing/value_builder/marc21_linking_section.pl b/cataloguing/value_builder/marc21_linking_section.pl >index 61e21c7..5c5d7bc 100755 >--- a/cataloguing/value_builder/marc21_linking_section.pl >+++ b/cataloguing/value_builder/marc21_linking_section.pl >@@ -144,7 +144,7 @@ my $launcher = sub { > $subfield_value_z =~ s/'/\\'/g; > $template->param( > fillinput => 1, >- index => $query->param('index') . "", >+ index => scalar $query->param('index') . "", > biblionumber => $biblionumber ? $biblionumber : "", > subfield_value_9 => "$subfield_value_9", > subfield_value_0 => "$subfield_value_0", >@@ -277,7 +277,7 @@ my $launcher = sub { > # ); > $template->param( > result => \@arrayresults, >- index => $query->param('index') . "", >+ index => scalar $query->param('index') . "", > startfrom => $startfrom, > displaynext => $displaynext, > displayprev => $displayprev, >@@ -308,7 +308,7 @@ my $launcher = sub { > > $template->param( > itypeloop => \@itemtypes, >- index => $query->param('index'), >+ index => scalar $query->param('index'), > Search => 1, > ); > } >diff --git a/cataloguing/value_builder/unimarc_field_210c.pl b/cataloguing/value_builder/unimarc_field_210c.pl >index 186d464..fe9f19a 100755 >--- a/cataloguing/value_builder/unimarc_field_210c.pl >+++ b/cataloguing/value_builder/unimarc_field_210c.pl >@@ -136,7 +136,7 @@ my ($input) = @_; > my $link="../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_210c.pl&authtypecode=EDITORS&".join("&",map {"value=".$_} @value)."&op=do_search&type=intranet&index=$index"; > > $template->param(result => $results) if $results; >- $template->param('index' => $query->param('index')); >+ $template->param('index' => scalar $query->param('index')); > $template->param(startfrom=> $startfrom, > displaynext=> $displaynext, > displayprev=> $displayprev, >diff --git a/cataloguing/value_builder/unimarc_field_4XX.pl b/cataloguing/value_builder/unimarc_field_4XX.pl >index f14a616..69d6f36 100755 >--- a/cataloguing/value_builder/unimarc_field_4XX.pl >+++ b/cataloguing/value_builder/unimarc_field_4XX.pl >@@ -324,7 +324,7 @@ sub plugin { > $subfield_value_y =~ s/'/\\'/g; > $template->param( > fillinput => 1, >- index => $query->param('index') . "", >+ index => scalar $query->param('index') . "", > biblionumber => $biblionumber ? $biblionumber : "", > subfield_value_9 => "$subfield_value_9", > subfield_value_0 => "$subfield_value_0", >@@ -478,7 +478,7 @@ sub plugin { > # ); > $template->param( > result => \@arrayresults, >- index => $query->param('index') . "", >+ index => scalar $query->param('index') . "", > startfrom => $startfrom, > displaynext => $displaynext, > displayprev => $displayprev, >@@ -512,7 +512,7 @@ sub plugin { > > $template->param( #classlist => $classlist, > itypeloop => \@itemtypes, >- index => $query->param('index'), >+ index => scalar $query->param('index'), > Search => 1, > ); > } >diff --git a/cataloguing/z3950_auth_search.pl b/cataloguing/z3950_auth_search.pl >index 960b5aa..c808b7b 100755 >--- a/cataloguing/z3950_auth_search.pl >+++ b/cataloguing/z3950_auth_search.pl >@@ -86,7 +86,7 @@ if ( @id==0 ) { > } > > my $pars= { >- random => $input->param('random') || rand(1000000000), >+ random => scalar $input->param('random') || rand(1000000000), > page => $page, > id => \@id, > nameany => $nameany, >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 6847a71..57c828f 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -621,7 +621,7 @@ $template->param( > branchname => GetBranchName($borrower->{'branchcode'}), > printer => $printer, > printername => $printer, >- was_renewed => $query->param('was_renewed') ? 1 : 0, >+ was_renewed => scalar $query->param('was_renewed') ? 1 : 0, > expiry => $borrower->{'dateexpiry'}, > roadtype => $roadtype, > amountold => $amountold, >diff --git a/circ/returns.pl b/circ/returns.pl >index 2f09b80..7442206 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -75,8 +75,8 @@ if ($session->param('branch') eq 'NO_LIBRARY_SET'){ > if ( $query->param('print_slip') ) { > $template->param( > print_slip => 1, >- borrowernumber => $query->param('borrowernumber'), >- biblionumber => $query->param('biblionumber'), >+ borrowernumber => scalar $query->param('borrowernumber'), >+ biblionumber => scalar $query->param('biblionumber'), > ); > } > >diff --git a/circ/selectbranchprinter.pl b/circ/selectbranchprinter.pl >index 7c0c6d7..36fd9a5 100755 >--- a/circ/selectbranchprinter.pl >+++ b/circ/selectbranchprinter.pl >@@ -119,7 +119,7 @@ foreach ($query->param()) { > $_ eq "oldreferer" and next; # disclude oldreferer > push @recycle_loop, { > param => $_, >- value => $query->param($_), >+ value => scalar $query->param($_), > }; > } > >diff --git a/course_reserves/add_items.pl b/course_reserves/add_items.pl >index 0c4a772..24ea732 100755 >--- a/course_reserves/add_items.pl >+++ b/course_reserves/add_items.pl >@@ -79,18 +79,18 @@ if ( $action eq 'lookup' ) { > > } elsif ( $action eq 'add' ) { > my $ci_id = ModCourseItem( >- itemnumber => $cgi->param('itemnumber'), >- itype => $cgi->param('itype'), >- ccode => $cgi->param('ccode'), >- holdingbranch => $cgi->param('holdingbranch'), >- location => $cgi->param('location'), >+ itemnumber => scalar $cgi->param('itemnumber'), >+ itype => scalar $cgi->param('itype'), >+ ccode => scalar $cgi->param('ccode'), >+ holdingbranch => scalar $cgi->param('holdingbranch'), >+ location => scalar $cgi->param('location'), > ); > > my $cr_id = ModCourseReserve( > course_id => $course_id, > ci_id => $ci_id, >- staff_note => $cgi->param('staff_note'), >- public_note => $cgi->param('public_note'), >+ staff_note => scalar $cgi->param('staff_note'), >+ public_note => scalar $cgi->param('public_note'), > ); > > if ( $return ) { >diff --git a/course_reserves/course-details.pl b/course_reserves/course-details.pl >index 845239d..af1eb62 100755 >--- a/course_reserves/course-details.pl >+++ b/course_reserves/course-details.pl >@@ -47,7 +47,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > ); > > if ( $action eq 'del_reserve' ) { >- DelCourseReserve( cr_id => $cgi->param('cr_id') ); >+ DelCourseReserve( cr_id => scalar $cgi->param('cr_id') ); > } > > my $course = GetCourse($course_id); >diff --git a/labels/label-edit-layout.pl b/labels/label-edit-layout.pl >index f84a01d..c1aafd4 100755 >--- a/labels/label-edit-layout.pl >+++ b/labels/label-edit-layout.pl >@@ -103,16 +103,16 @@ elsif ($op eq 'save') { > $cgi->param('format_string', $format_string); > } > my @params = ( >- barcode_type => $cgi->param('barcode_type') || 'CODE39', >- printing_type => $cgi->param('printing_type') || 'BAR', >- layout_name => $cgi->param('layout_name') || 'DEFAULT', >+ barcode_type => scalar $cgi->param('barcode_type') || 'CODE39', >+ printing_type => scalar $cgi->param('printing_type') || 'BAR', >+ layout_name => scalar $cgi->param('layout_name') || 'DEFAULT', > guidebox => ($cgi->param('guidebox') ? 1 : 0), > oblique_title => ($cgi->param('oblique_title') ? 1 : 0), >- font => $cgi->param('font') || 'TR', >- font_size => $cgi->param('font_size') || 3, >+ font => scalar $cgi->param('font') || 'TR', >+ font_size => scalar $cgi->param('font_size') || 3, > callnum_split => ($cgi->param('callnum_split') ? 1 : 0), >- text_justify => $cgi->param('text_justify') || 'L', >- format_string => $cgi->param('format_string') || 'title, author, isbn, issn, itemtype, barcode, itemcallnumber', >+ text_justify => scalar $cgi->param('text_justify') || 'L', >+ format_string => scalar $cgi->param('format_string') || 'title, author, isbn, issn, itemtype, barcode, itemcallnumber', > ); > if ($layout_id) { # if a label_id was passed in, this is an update to an existing layout > $layout = C4::Labels::Layout->retrieve(layout_id => $layout_id); >diff --git a/labels/label-edit-profile.pl b/labels/label-edit-profile.pl >index eb8c206..7e87370 100755 >--- a/labels/label-edit-profile.pl >+++ b/labels/label-edit-profile.pl >@@ -54,13 +54,13 @@ if ($op eq 'edit') { > } > elsif ($op eq 'save') { > my @params = ( >- printer_name => $cgi->param('printer_name') || 'DEFAULT PRINTER', >- paper_bin => $cgi->param('paper_bin') || 'Tray 1', >- offset_horz => $cgi->param('offset_horz') || 0, >- offset_vert => $cgi->param('offset_vert') || 0, >- creep_horz => $cgi->param('creep_horz') || 0, >- creep_vert => $cgi->param('creep_vert') || 0, >- units => $cgi->param('units') || 'POINT', >+ printer_name => scalar $cgi->param('printer_name') || 'DEFAULT PRINTER', >+ paper_bin => scalar $cgi->param('paper_bin') || 'Tray 1', >+ offset_horz => scalar $cgi->param('offset_horz') || 0, >+ offset_vert => scalar $cgi->param('offset_vert') || 0, >+ creep_horz => scalar $cgi->param('creep_horz') || 0, >+ creep_vert => scalar $cgi->param('creep_vert') || 0, >+ units => scalar $cgi->param('units') || 'POINT', > ); > if ($profile_id) { # if a label_id was passed in, this is an update to an existing layout > $profile = C4::Labels::Profile->retrieve(profile_id => $profile_id); >diff --git a/labels/label-edit-template.pl b/labels/label-edit-template.pl >index 4e1e002..c06a9f1 100755 >--- a/labels/label-edit-template.pl >+++ b/labels/label-edit-template.pl >@@ -61,22 +61,22 @@ if ($op eq 'edit') { > } > } > elsif ($op eq 'save') { >- my @params = ( profile_id => $cgi->param('profile_id'), >- template_code => $cgi->param('template_code') || 'DEFAULT_TEMPLATE', >- template_desc => $cgi->param('template_desc') || 'Default description', >- page_width => $cgi->param('page_width') || 0, >- page_height => $cgi->param('page_height') || 0, >- label_width => $cgi->param('label_width') || 0, >- label_height => $cgi->param('label_height') || 0, >- top_text_margin => $cgi->param('top_text_margin') || 0, >- left_text_margin=> $cgi->param('left_text_margin') || 0, >- top_margin => $cgi->param('top_margin') || 0, >- left_margin => $cgi->param('left_margin') || 0, >- cols => $cgi->param('cols') || 0, >- rows => $cgi->param('rows') || 0, >- col_gap => $cgi->param('col_gap') || 0, >- row_gap => $cgi->param('row_gap') || 0, >- units => $cgi->param('units') || 'POINT', >+ my @params = ( profile_id => scalar $cgi->param('profile_id'), >+ template_code => scalar $cgi->param('template_code') || 'DEFAULT_TEMPLATE', >+ template_desc => scalar $cgi->param('template_desc') || 'Default description', >+ page_width => scalar $cgi->param('page_width') || 0, >+ page_height => scalar $cgi->param('page_height') || 0, >+ label_width => scalar $cgi->param('label_width') || 0, >+ label_height => scalar $cgi->param('label_height') || 0, >+ top_text_margin => scalar $cgi->param('top_text_margin') || 0, >+ left_text_margin=> scalar $cgi->param('left_text_margin') || 0, >+ top_margin => scalar $cgi->param('top_margin') || 0, >+ left_margin => scalar $cgi->param('left_margin') || 0, >+ cols => scalar $cgi->param('cols') || 0, >+ rows => scalar $cgi->param('rows') || 0, >+ col_gap => scalar $cgi->param('col_gap') || 0, >+ row_gap => scalar $cgi->param('row_gap') || 0, >+ units => scalar $cgi->param('units') || 'POINT', > ); > if ($template_id) { # if a template_id was passed in, this is an update to an existing template > $label_template = C4::Labels::Template->retrieve(template_id => $template_id); >@@ -87,7 +87,7 @@ elsif ($op eq 'save') { > $old_profile->set_attr(template_id => 0); > $old_profile->save(); > } >- my $new_profile = C4::Labels::Profile->retrieve(profile_id => $cgi->param('profile_id')); >+ my $new_profile = C4::Labels::Profile->retrieve(profile_id => scalar $cgi->param('profile_id')); > $new_profile->set_attr(template_id => $label_template->get_attr('template_id')); > $new_profile->save(); > } >@@ -106,7 +106,7 @@ elsif ($op eq 'save') { > $label_template = C4::Labels::Template->new(@params); > my $template_id = $label_template->save(); > if ($cgi->param('profile_id')) { >- my $profile = C4::Labels::Profile->retrieve(profile_id => $cgi->param('profile_id')); >+ my $profile = C4::Labels::Profile->retrieve(profile_id => scalar $cgi->param('profile_id')); > $profile->set_attr(template_id => $template_id) if $template_id != $profile->get_attr('template_id'); > $profile->save(); > } >diff --git a/members/files.pl b/members/files.pl >index 73a486a..3aa6aa7 100755 >--- a/members/files.pl >+++ b/members/files.pl >@@ -91,7 +91,7 @@ else { > name => $filename, > type => $mimetype, > content => $file_content, >- description => $cgi->param('description'), >+ description => scalar $cgi->param('description'), > ); > } > } >@@ -99,7 +99,7 @@ else { > $errors{'no_file'} = 1; > } > } elsif ( $op eq 'delete' ) { >- $bf->DelFile( id => $cgi->param('file_id') ); >+ $bf->DelFile( id => scalar $cgi->param('file_id') ); > } > > $template->param( >diff --git a/members/member.pl b/members/member.pl >index 1cc5ac5..312b2e5 100755 >--- a/members/member.pl >+++ b/members/member.pl >@@ -77,9 +77,9 @@ my $view = $input->request_method() eq "GET" ? "show_form" : "show_results"; > $template->param( > patron_lists => [ GetPatronLists() ], > searchmember => $searchmember, >- branchcode_filter => $input->param('branchcode_filter'), >- categorycode_filter => $input->param('categorycode_filter'), >- searchtype => $input->param('searchtype') || 'start_with', >+ branchcode_filter => scalar $input->param('branchcode_filter'), >+ categorycode_filter => scalar $input->param('categorycode_filter'), >+ searchtype => scalar $input->param('searchtype') || 'start_with', > searchfieldstype => $searchfieldstype, > PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20, > view => $view, >diff --git a/members/memberentry.pl b/members/memberentry.pl >index 1fa4531..deaf0dc 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -119,7 +119,7 @@ if ( $input->param('add_debarment') ) { > { > borrowernumber => $borrowernumber, > type => 'MANUAL', >- comment => $input->param('debarred_comment'), >+ comment => scalar $input->param('debarred_comment'), > expiration => $expiration, > } > ); >diff --git a/members/mod_debarment.pl b/members/mod_debarment.pl >index 444114e..5724b2b 100755 >--- a/members/mod_debarment.pl >+++ b/members/mod_debarment.pl >@@ -44,7 +44,7 @@ if ( $action eq 'del' ) { > AddDebarment( > { borrowernumber => $borrowernumber, > type => 'MANUAL', >- comment => $cgi->param('comment'), >+ comment => scalar $cgi->param('comment'), > expiration => $expiration, > } > ); >diff --git a/members/moremember.pl b/members/moremember.pl >index 7c962a4..80814c3 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -324,7 +324,7 @@ $template->param( > borrowernumber => $borrowernumber, > othernames => $data->{'othernames'}, > categoryname => $data->{'description'}, >- was_renewed => $input->param('was_renewed') ? 1 : 0, >+ was_renewed => scalar $input->param('was_renewed') ? 1 : 0, > branch => $branch, > todaysdate => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }), > totalprice => sprintf("%.2f", $totalprice), >diff --git a/members/nl-search.pl b/members/nl-search.pl >index dc6e585..1d6126b 100755 >--- a/members/nl-search.pl >+++ b/members/nl-search.pl >@@ -111,35 +111,35 @@ if ( $op && $op eq 'search' ) { > my %borrower = ( > 'surname' => NLGetSurname( $cgi->param('navn') ), > 'firstname' => NLGetFirstname( $cgi->param('navn') ), >- 'sex' => $cgi->param('kjonn'), >- 'dateofbirth' => $cgi->param('fdato'), >- 'cardnumber' => $cgi->param('lnr'), >- 'userid' => $cgi->param('lnr'), >- 'address' => $cgi->param('p_adresse1'), >- 'address2' => $cgi->param('p_adresse2'), >- 'zipcode' => $cgi->param('p_postnr'), >- 'city' => $cgi->param('p_sted'), >- 'country' => $cgi->param('p_land'), >- 'B_address' => $cgi->param('m_adresse1'), >- 'B_address2' => $cgi->param('m_adresse2'), >- 'B_zipcode' => $cgi->param('m_postnr'), >- 'B_city' => $cgi->param('m_sted'), >- 'B_country' => $cgi->param('m_land'), >+ 'sex' => scalar $cgi->param('kjonn'), >+ 'dateofbirth' => scalar $cgi->param('fdato'), >+ 'cardnumber' => scalar $cgi->param('lnr'), >+ 'userid' => scalar $cgi->param('lnr'), >+ 'address' => scalar $cgi->param('p_adresse1'), >+ 'address2' => scalar $cgi->param('p_adresse2'), >+ 'zipcode' => scalar $cgi->param('p_postnr'), >+ 'city' => scalar $cgi->param('p_sted'), >+ 'country' => scalar $cgi->param('p_land'), >+ 'B_address' => scalar $cgi->param('m_adresse1'), >+ 'B_address2' => scalar $cgi->param('m_adresse2'), >+ 'B_zipcode' => scalar $cgi->param('m_postnr'), >+ 'B_city' => scalar $cgi->param('m_sted'), >+ 'B_country' => scalar $cgi->param('m_land'), > 'password' => NLDecodePin( $cgi->param('pin') ), >- 'dateexpiry' => $cgi->param('gyldig_til'), >- 'email' => $cgi->param('epost'), >- 'mobile' => $cgi->param('tlf_mobil'), >- 'phone' => $cgi->param('tlf_hjemme'), >- 'phonepro' => $cgi->param('tlf_jobb'), >+ 'dateexpiry' => scalar $cgi->param('gyldig_til'), >+ 'email' => scalar $cgi->param('epost'), >+ 'mobile' => scalar $cgi->param('tlf_mobil'), >+ 'phone' => scalar $cgi->param('tlf_hjemme'), >+ 'phonepro' => scalar $cgi->param('tlf_jobb'), > 'branchcode' => $userenv->{'branch'}, >- 'categorycode' => $cgi->param('categorycode'), >+ 'categorycode' => scalar $cgi->param('categorycode'), > ); > # Add the new patron > my $borrowernumber = &AddMember(%borrower); > if ( $borrowernumber ) { > # Add extended patron attributes > SetBorrowerAttributes($borrowernumber, [ >- { code => 'fnr', value => $cgi->param('fnr_hash') }, >+ { code => 'fnr', value => scalar $cgi->param('fnr_hash') }, > ], 'no_branch_limit' ); > # Override the default sync data created by AddMember > my $borrowersync = Koha::Database->new->schema->resultset('BorrowerSync')->find({ >diff --git a/members/paycollect.pl b/members/paycollect.pl >index e9de655..c68d205 100755 >--- a/members/paycollect.pl >+++ b/members/paycollect.pl >@@ -96,7 +96,7 @@ if ( $individual || $writeoff ) { > $template->param( > selected_accts => $select_lines, > amt => $total_due, >- selected_accts_notes => $input->param('notes'), >+ selected_accts_notes => scalar $input->param('notes'), > ); > } > >diff --git a/opac/opac-account.pl b/opac/opac-account.pl >index 7512f2e..e02e5f3 100755 >--- a/opac/opac-account.pl >+++ b/opac/opac-account.pl >@@ -67,10 +67,10 @@ $template->param( > ACCOUNT_LINES => $accts, > total => sprintf( "%.2f", $total ), > accountview => 1, >- message => $query->param('message') || q{}, >- message_value => $query->param('message_value') || q{}, >- payment => $query->param('payment') || q{}, >- payment_error => $query->param('payment-error') || q{}, >+ message => scalar $query->param('message') || q{}, >+ message_value => scalar $query->param('message_value') || q{}, >+ payment => scalar $query->param('payment') || q{}, >+ payment_error => scalar $query->param('payment-error') || q{}, > ); > > output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 }; >diff --git a/opac/opac-review.pl b/opac/opac-review.pl >index 0d5d924..43705e3 100755 >--- a/opac/opac-review.pl >+++ b/opac/opac-review.pl >@@ -74,7 +74,7 @@ $template->param( > 'biblionumber' => $biblionumber, > 'borrowernumber' => $borrowernumber, > 'review' => $clean || $savedreview->{'review'}, >- 'reviewid' => $query->param('reviewid') || 0, >+ 'reviewid' => scalar $query->param('reviewid') || 0, > 'title' => $biblio->{'title'}, > ); > >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index c012369..67ad9bb 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -363,7 +363,7 @@ if ( $template_type && $template_type eq 'advsearch' ) { > # but let the user override it > if (defined $cgi->param('expanded_options')) { > if ( ($cgi->param('expanded_options') == 0) || ($cgi->param('expanded_options') == 1 ) ) { >- $template->param( expanded_options => $cgi->param('expanded_options')); >+ $template->param( expanded_options => scalar $cgi->param('expanded_options')); > } > } > >diff --git a/opac/opac-serial-issues.pl b/opac/opac-serial-issues.pl >index fad6127..11928bd 100755 >--- a/opac/opac-serial-issues.pl >+++ b/opac/opac-serial-issues.pl >@@ -78,7 +78,7 @@ if ( $selectview eq "full" ) { > # $subscription->{opacnote} =~ s/\n/\<br\/\>/g; > > $template->param( >- biblionumber => $query->param('biblionumber'), >+ biblionumber => scalar $query->param('biblionumber'), > years => $subscriptioninformation, > yearmin => $yearmin, > yearmax => $yearmax, >@@ -114,7 +114,7 @@ else { > # $subscription->{opacnote} =~ s/\n/\<br\/\>/g; > > $template->param( >- biblionumber => $query->param('biblionumber'), >+ biblionumber => scalar $query->param('biblionumber'), > subscription_LOOP => $subscriptions, > ); > } >diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl >index e0792ca..353e870 100755 >--- a/opac/opac-shelves.pl >+++ b/opac/opac-shelves.pl >@@ -355,7 +355,7 @@ $template->param( > shelf => $shelf, > messages => \@messages, > category => $category, >- print => $query->param('print') || 0, >+ print => scalar $query->param('print') || 0, > listsview => 1, > ); > >diff --git a/opac/opac-topissues.pl b/opac/opac-topissues.pl >index ac240df..1bb4d2d 100755 >--- a/opac/opac-topissues.pl >+++ b/opac/opac-topissues.pl >@@ -88,7 +88,7 @@ foreach my $type (@advanced_search_types) { > $type = 'itemtype'; > } > $params->{$type} = $input->param($type); >- $template->param('selected_' . $type => $input->param($type)); >+ $template->param('selected_' . $type => scalar $input->param($type)); > } > > my @results = GetTopIssues($params); >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index 0828739..413c26d 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -353,7 +353,7 @@ $template->param( > SuspendHoldsOpac => C4::Context->preference('SuspendHoldsOpac'), > AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'), > OpacHoldNotes => C4::Context->preference('OpacHoldNotes'), >- failed_holds => $query->param('failed_holds'), >+ failed_holds => scalar $query->param('failed_holds'), > ); > > output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 }; >diff --git a/patron_lists/list.pl b/patron_lists/list.pl >index 596a2c1..9a21681 100755 >--- a/patron_lists/list.pl >+++ b/patron_lists/list.pl >@@ -38,7 +38,7 @@ my ( $template, $logged_in_user, $cookie ) = get_template_and_user( > ); > > my ($list) = >- GetPatronLists( { patron_list_id => $cgi->param('patron_list_id') } ); >+ GetPatronLists( { patron_list_id => scalar $cgi->param('patron_list_id') } ); > > my @patrons_to_add = $cgi->multi_param('patrons_to_add'); > if (@patrons_to_add) { >diff --git a/patroncards/edit-profile.pl b/patroncards/edit-profile.pl >index 415cd8c..55e903c 100755 >--- a/patroncards/edit-profile.pl >+++ b/patroncards/edit-profile.pl >@@ -54,13 +54,13 @@ if ($op eq 'edit') { > } > elsif ($op eq 'save') { > my @params = ( >- printer_name => $cgi->param('printer_name'), >- paper_bin => $cgi->param('paper_bin'), >- offset_horz => $cgi->param('offset_horz'), >- offset_vert => $cgi->param('offset_vert'), >- creep_horz => $cgi->param('creep_horz'), >- creep_vert => $cgi->param('creep_vert'), >- units => $cgi->param('units'), >+ printer_name => scalar $cgi->param('printer_name'), >+ paper_bin => scalar $cgi->param('paper_bin'), >+ offset_horz => scalar $cgi->param('offset_horz'), >+ offset_vert => scalar $cgi->param('offset_vert'), >+ creep_horz => scalar $cgi->param('creep_horz'), >+ creep_vert => scalar $cgi->param('creep_vert'), >+ units => scalar $cgi->param('units'), > ); > if ($profile_id) { # if a label_id was passed in, this is an update to an existing layout > $profile = C4::Patroncards::Profile->retrieve(profile_id => $profile_id); >diff --git a/patroncards/edit-template.pl b/patroncards/edit-template.pl >index 763fe45..c7b4708 100755 >--- a/patroncards/edit-template.pl >+++ b/patroncards/edit-template.pl >@@ -53,20 +53,20 @@ if ($op eq 'edit') { > $profile_list = get_all_profiles(field_list => 'profile_id,printer_name,paper_bin', filter => "template_id=$template_id OR template_id=''"); > } > elsif ($op eq 'save') { >- my @params = ( profile_id => $cgi->param('profile_id') || '', >- template_code => $cgi->param('template_code'), >- template_desc => $cgi->param('template_desc'), >- page_width => $cgi->param('page_width'), >- page_height => $cgi->param('page_height'), >- label_width => $cgi->param('card_width'), >- label_height => $cgi->param('card_height'), >- top_margin => $cgi->param('top_margin'), >- left_margin => $cgi->param('left_margin'), >- cols => $cgi->param('cols'), >- rows => $cgi->param('rows'), >- col_gap => $cgi->param('col_gap'), >- row_gap => $cgi->param('row_gap'), >- units => $cgi->param('units'), >+ my @params = ( profile_id => scalar $cgi->param('profile_id') || '', >+ template_code => scalar $cgi->param('template_code'), >+ template_desc => scalar $cgi->param('template_desc'), >+ page_width => scalar $cgi->param('page_width'), >+ page_height => scalar $cgi->param('page_height'), >+ label_width => scalar $cgi->param('card_width'), >+ label_height => scalar $cgi->param('card_height'), >+ top_margin => scalar $cgi->param('top_margin'), >+ left_margin => scalar $cgi->param('left_margin'), >+ cols => scalar $cgi->param('cols'), >+ rows => scalar $cgi->param('rows'), >+ col_gap => scalar $cgi->param('col_gap'), >+ row_gap => scalar $cgi->param('row_gap'), >+ units => scalar $cgi->param('units'), > ); > if ($template_id) { # if a template_id was passed in, this is an update to an existing template > $card_template = C4::Patroncards::Template->retrieve(template_id => $template_id); >@@ -76,7 +76,7 @@ elsif ($op eq 'save') { > $old_profile->set_attr(template_id => 0); > $old_profile->save(); > } >- my $new_profile = C4::Patroncards::Profile->retrieve(profile_id => $cgi->param('profile_id')); >+ my $new_profile = C4::Patroncards::Profile->retrieve(profile_id => scalar $cgi->param('profile_id')); > $new_profile->set_attr(template_id => $card_template->get_attr('template_id')); > $new_profile->save(); > } >@@ -88,7 +88,7 @@ elsif ($op eq 'save') { > die "Error: $card_template\n" if !ref($card_template); > my $template_id = $card_template->save(); > if ($cgi->param('profile_id')) { >- my $profile = C4::Patroncards::Profile->retrieve(profile_id => $cgi->param('profile_id')); >+ my $profile = C4::Patroncards::Profile->retrieve(profile_id => scalar $cgi->param('profile_id')); > $profile->set_attr(template_id => $template_id) if $template_id != $profile->get_attr('template_id'); > $profile->save(); > } >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index 7af02bc..75040f4 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -286,16 +286,16 @@ elsif ( $phase eq 'Report on this Area' ) { > 'areas' => get_report_areas(), > 'cache_expiry' => $cache_expiry, > 'usecache' => $usecache, >- 'public' => $input->param('public'), >+ 'public' => scalar $input->param('public'), > ); > } else { > # they have choosen a new report and the area to report on > $template->param( > 'build2' => 1, >- 'area' => $input->param('area'), >+ 'area' => scalar $input->param('area'), > 'types' => get_report_types(), > 'cache_expiry' => $cache_expiry, >- 'public' => $input->param('public'), >+ 'public' => scalar $input->param('public'), > ); > } > } >@@ -310,8 +310,8 @@ elsif ( $phase eq 'Choose this type' ) { > 'area' => $area, > 'type' => $type, > columns => get_columns($area,$input), >- 'cache_expiry' => $input->param('cache_expiry'), >- 'public' => $input->param('public'), >+ 'cache_expiry' => scalar $input->param('cache_expiry'), >+ 'public' => scalar $input->param('public'), > ); > } > >@@ -330,12 +330,12 @@ elsif ( $phase eq 'Choose these columns' ) { > 'column' => $column, > definitions => get_from_dictionary($area), > criteria => get_criteria($area,$input), >- 'public' => $input->param('public'), >+ 'public' => scalar $input->param('public'), > ); > if ( $usecache ) { > $template->param( >- cache_expiry => $input->param('cache_expiry'), >- cache_expiry_units => $input->param('cache_expiry_units'), >+ cache_expiry => scalar $input->param('cache_expiry'), >+ cache_expiry_units => scalar $input->param('cache_expiry_units'), > ); > } > >@@ -395,12 +395,12 @@ elsif ( $phase eq 'Choose these criteria' ) { > 'column' => $column, > 'definition' => $definition, > 'criteriastring' => $query_criteria, >- 'public' => $input->param('public'), >+ 'public' => scalar $input->param('public'), > ); > if ( $usecache ) { > $template->param( >- cache_expiry => $input->param('cache_expiry'), >- cache_expiry_units => $input->param('cache_expiry_units'), >+ cache_expiry => scalar $input->param('cache_expiry'), >+ cache_expiry_units => scalar $input->param('cache_expiry_units'), > ); > } > >@@ -442,8 +442,8 @@ elsif ( $phase eq 'Choose these operations' ) { > 'criteriastring' => $criteria, > 'totals' => $totals, > 'definition' => $definition, >- 'cache_expiry' => $input->param('cache_expiry'), >- 'public' => $input->param('public'), >+ 'cache_expiry' => scalar $input->param('cache_expiry'), >+ 'public' => scalar $input->param('public'), > ); > > # get columns >@@ -495,8 +495,8 @@ elsif ( $phase eq 'Build report' ) { > 'area' => $area, > 'sql' => $sql, > 'type' => $type, >- 'cache_expiry' => $input->param('cache_expiry'), >- 'public' => $input->param('public'), >+ 'cache_expiry' => scalar $input->param('cache_expiry'), >+ 'public' => scalar $input->param('public'), > ); > } > >@@ -510,8 +510,8 @@ elsif ( $phase eq 'Save' ) { > 'area' => $area, > 'sql' => $sql, > 'type' => $type, >- 'cache_expiry' => $input->param('cache_expiry'), >- 'public' => $input->param('public'), >+ 'cache_expiry' => scalar $input->param('cache_expiry'), >+ 'public' => scalar $input->param('public'), > 'groups_with_subgroups' => groups_with_subgroups($area), # in case we have a report group that matches area > ); > } >@@ -912,9 +912,9 @@ elsif ( $phase eq 'Create report from SQL' ) { > $group = $input->param('report_group'); > $subgroup = $input->param('report_subgroup'); > $template->param( >- 'sql' => $input->param('sql') // '', >- 'reportname' => $input->param('reportname') // '', >- 'notes' => $input->param('notes') // '', >+ 'sql' => scalar $input->param('sql') // '', >+ 'reportname' => scalar $input->param('reportname') // '', >+ 'notes' => scalar $input->param('notes') // '', > ); > } > $template->param( >diff --git a/serials/serial-issues.pl b/serials/serial-issues.pl >index c5bfbca..fdda1fd 100755 >--- a/serials/serial-issues.pl >+++ b/serials/serial-issues.pl >@@ -76,7 +76,7 @@ if ($selectview eq "full"){ > # $subscription->{opacnote} =~ s/\n/\<br\/\>/g; > > $template->param( >- biblionumber => $query->param('biblionumber'), >+ biblionumber => scalar $query->param('biblionumber'), > years => $subscriptions, > yearmin => $yearmin, > yearmax =>$yearmax, >diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl >index f51fabb..47d07eb 100755 >--- a/serials/serials-collection.pl >+++ b/serials/serials-collection.pl >@@ -160,7 +160,7 @@ $template->param( > suggestion => C4::Context->preference("suggestion"), > virtualshelves => C4::Context->preference("virtualshelves"), > routing => C4::Context->preference("RoutingSerials"), >- subscr=>$query->param('subscriptionid'), >+ subscr=>scalar $query->param('subscriptionid'), > subscriptioncount => $subscriptioncount, > location => $location, > callnumber => $callnumber, >diff --git a/serials/showpredictionpattern.pl b/serials/showpredictionpattern.pl >index add9f06..6986b5e 100755 >--- a/serials/showpredictionpattern.pl >+++ b/serials/showpredictionpattern.pl >@@ -59,22 +59,22 @@ my $custompattern = $input->param('custompattern'); > my $frequency = GetSubscriptionFrequency($frequencyid); > > my %pattern = ( >- numberingmethod => $input->param('numberingmethod') // '', >- numbering1 => $input->param('numbering1') // '', >- numbering2 => $input->param('numbering2') // '', >- numbering3 => $input->param('numbering3') // '', >- add1 => $input->param('add1') // '', >- add2 => $input->param('add2') // '', >- add3 => $input->param('add3') // '', >- whenmorethan1 => $input->param('whenmorethan1') // '', >- whenmorethan2 => $input->param('whenmorethan2') // '', >- whenmorethan3 => $input->param('whenmorethan3') // '', >- setto1 => $input->param('setto1') // '', >- setto2 => $input->param('setto2') // '', >- setto3 => $input->param('setto3') // '', >- every1 => $input->param('every1') // '', >- every2 => $input->param('every2') // '', >- every3 => $input->param('every3') // '', >+ numberingmethod => scalar $input->param('numberingmethod') // '', >+ numbering1 => scalar $input->param('numbering1') // '', >+ numbering2 => scalar $input->param('numbering2') // '', >+ numbering3 => scalar $input->param('numbering3') // '', >+ add1 => scalar $input->param('add1') // '', >+ add2 => scalar $input->param('add2') // '', >+ add3 => scalar $input->param('add3') // '', >+ whenmorethan1 => scalar $input->param('whenmorethan1') // '', >+ whenmorethan2 => scalar $input->param('whenmorethan2') // '', >+ whenmorethan3 => scalar $input->param('whenmorethan3') // '', >+ setto1 => scalar $input->param('setto1') // '', >+ setto2 => scalar $input->param('setto2') // '', >+ setto3 => scalar $input->param('setto3') // '', >+ every1 => scalar $input->param('every1') // '', >+ every2 => scalar $input->param('every2') // '', >+ every3 => scalar $input->param('every3') // '', > ); > > $firstacquidate = eval { output_pref( { str => $firstacquidate, dateonly => 1, dateformat => 'iso' } ); } >@@ -90,13 +90,13 @@ if($nextacquidate) { > my $date = $nextacquidate; > > my %subscription = ( >- locale => $input->param('locale') // '', >- lastvalue1 => $input->param('lastvalue1') // '', >- lastvalue2 => $input->param('lastvalue2') // '', >- lastvalue3 => $input->param('lastvalue3') // '', >- innerloop1 => $input->param('innerloop1') // '', >- innerloop2 => $input->param('innerloop2') // '', >- innerloop3 => $input->param('innerloop3') // '', >+ locale => scalar $input->param('locale') // '', >+ lastvalue1 => scalar $input->param('lastvalue1') // '', >+ lastvalue2 => scalar $input->param('lastvalue2') // '', >+ lastvalue3 => scalar $input->param('lastvalue3') // '', >+ innerloop1 => scalar $input->param('innerloop1') // '', >+ innerloop2 => scalar $input->param('innerloop2') // '', >+ innerloop3 => scalar $input->param('innerloop3') // '', > irregularity => '', > periodicity => $frequencyid, > countissuesperunit => 1, >diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl >index 1d9ab37..31a6b6b 100755 >--- a/serials/subscription-add.pl >+++ b/serials/subscription-add.pl >@@ -323,9 +323,9 @@ sub redirect_add_subscription { > my $location = $query->param('location'); > my $skip_serialseq = $query->param('skip_serialseq'); > >- my $startdate = output_pref( { str => $query->param('startdate'), dateonly => 1, dateformat => 'iso' } ); >- my $enddate = output_pref( { str => $query->param('enddate'), dateonly => 1, dateformat => 'iso' } ); >- my $firstacquidate = output_pref( { str => $query->param('firstacquidate'), dateonly => 1, dateformat => 'iso' } ); >+ my $startdate = output_pref( { str => scalar $query->param('startdate'), dateonly => 1, dateformat => 'iso' } ); >+ my $enddate = output_pref( { str => scalar $query->param('enddate'), dateonly => 1, dateformat => 'iso' } ); >+ my $firstacquidate = output_pref( { str => scalar $query->param('firstacquidate'), dateonly => 1, dateformat => 'iso' } ); > > if(!defined $enddate || $enddate eq '') { > if($subtype eq "issues") { >@@ -357,16 +357,16 @@ sub redirect_mod_subscription { > my $subscriptionid = $query->param('subscriptionid'); > my @irregularity = $query->multi_param('irregularity'); > my $auser = $query->param('user'); >- my $librarian => $query->param('librarian'), >+ my $librarian => scalar $query->param('librarian'), > my $branchcode = $query->param('branchcode'); > my $cost = $query->param('cost'); > my $aqbooksellerid = $query->param('aqbooksellerid'); > my $biblionumber = $query->param('biblionumber'); > my $aqbudgetid = $query->param('aqbudgetid'); > >- my $startdate = output_pref( { str => $query->param('startdate'), dateonly => 1, dateformat => 'iso' } ); >- my $enddate = output_pref( { str => $query->param('enddate'), dateonly => 1, dateformat => 'iso' } ); >- my $firstacquidate = output_pref( { str => $query->param('firstacquidate'), dateonly => 1, dateformat => 'iso' } ); >+ my $startdate = output_pref( { str => scalar $query->param('startdate'), dateonly => 1, dateformat => 'iso' } ); >+ my $enddate = output_pref( { str => scalar $query->param('enddate'), dateonly => 1, dateformat => 'iso' } ); >+ my $firstacquidate = output_pref( { str => scalar $query->param('firstacquidate'), dateonly => 1, dateformat => 'iso' } ); > > my $nextacquidate = $query->param('nextacquidate'); > $nextacquidate = $nextacquidate >@@ -451,7 +451,7 @@ sub insert_additional_fields { > } > } else { > $af->{values} = { >- $subscriptionid => $query->param('additional_field_' . $field->{id}) >+ $subscriptionid => scalar $query->param('additional_field_' . $field->{id}) > } if defined $query->param('additional_field_' . $field->{id}); > } > $af->insert_values; >diff --git a/serials/subscription-renew.pl b/serials/subscription-renew.pl >index 226a387..bbbc8e5 100755 >--- a/serials/subscription-renew.pl >+++ b/serials/subscription-renew.pl >@@ -74,7 +74,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > } > ); > if ( $op eq "renew" ) { >- my $startdate = output_pref( { str => $query->param('startdate'), dateonly => 1, dateformat => 'iso' } ); >+ my $startdate = output_pref( { str => scalar $query->param('startdate'), dateonly => 1, dateformat => 'iso' } ); > ReNewSubscription( > $subscriptionid, $loggedinuser, > $startdate, $query->param('numberlength'), >diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl >index 53d39a7..0d6006b 100755 >--- a/virtualshelves/shelves.pl >+++ b/virtualshelves/shelves.pl >@@ -302,7 +302,7 @@ $template->param( > shelf => $shelf, > messages => \@messages, > category => $category, >- print => $query->param('print') || 0, >+ print => scalar $query->param('print') || 0, > csv_profiles => GetCsvProfilesLoop('marc'), > ); > >-- >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