@@ -, +, @@ CGI->multi_param in list context - part 2 - Add/modify a library, patron category, patron attr type - Update a syspref - Set localcoverimage and call catalogue/image.pl?biblionumber=XXX - Search for patrons in the patron cards or serials module - Add a marc modification templates - Add a list (shelves) --- C4/Form/MessagingPreferences.pm | 4 ++-- admin/branches.pl | 8 ++++---- admin/patron-attr-types.pl | 4 ++-- catalogue/image.pl | 2 +- circ/circulation.pl | 2 +- svc/config/systempreferences | 2 +- svc/members/search | 2 +- svc/virtualshelves/search | 2 +- tools/marc_modification_templates.pl | 6 +++--- 9 files changed, 16 insertions(+), 16 deletions(-) --- a/C4/Form/MessagingPreferences.pm +++ a/C4/Form/MessagingPreferences.pm @@ -81,11 +81,11 @@ sub handle_form_action { message_attribute_id => $option->{'message_attribute_id'} }; # find the desired transports - @{$updater->{'message_transport_types'}} = $query->param( $option->{'message_attribute_id'} ); + @{$updater->{'message_transport_types'}} = $query->multi_param( $option->{'message_attribute_id'} ); next OPTION unless $updater->{'message_transport_types'}; if ( $option->{'has_digest'} ) { - if ( List::Util::first { $_ == $option->{'message_attribute_id'} } $query->param( 'digest' ) ) { + if ( List::Util::first { $_ == $option->{'message_attribute_id'} } $query->multi_param( 'digest' ) ) { $updater->{'wants_digest'} = 1; } } --- a/admin/branches.pl +++ a/admin/branches.pl @@ -87,7 +87,7 @@ if ( $op eq 'add_form' ) { if ($is_a_modif) { my $library = Koha::Libraries->find($branchcode); for my $field (@fields) { - $library->$field( $input->param($field) ); + $library->$field( scalar $input->param($field) ); } $library->update_categories( \@categories ); @@ -168,9 +168,9 @@ if ( $op eq 'add_form' ) { if ($is_a_modif) { my $category = Koha::LibraryCategories->find($categorycode); for my $field (@fields) { - $category->$field( $input->param($field) ); + $category->$field( scalar $input->param($field) ); } - $category->show_in_pulldown( $input->param('show_in_pulldown') eq 'on' ); + $category->show_in_pulldown( scalar $input->param('show_in_pulldown') eq 'on' ); eval { $category->store; }; if ($@) { push @messages, { type => 'alert', code => 'error_on_update_category' }; @@ -183,7 +183,7 @@ if ( $op eq 'add_form' ) { ( map { $_ => scalar $input->param($_) || undef } @fields ) } ); - $category->show_in_pulldown( $input->param('show_in_pulldown') eq 'on' ); + $category->show_in_pulldown( scalar $input->param('show_in_pulldown') eq 'on' ); eval { $category->store; }; if ($@) { push @messages, { type => 'alert', code => 'error_on_insert_category' }; --- a/admin/patron-attr-types.pl +++ a/admin/patron-attr-types.pl @@ -171,8 +171,8 @@ sub add_update_attribute_type { $attr_type->password_allowed($password_allowed); my $display_checkout = $input->param('display_checkout'); $attr_type->display_checkout($display_checkout); - $attr_type->category_code($input->param('category_code')); - $attr_type->class($input->param('class')); + $attr_type->category_code(scalar $input->param('category_code')); + $attr_type->class(scalar $input->param('class')); my @branches = $input->multi_param('branches'); $attr_type->branches( \@branches ); --- a/catalogue/image.pl +++ a/catalogue/image.pl @@ -64,7 +64,7 @@ if ( C4::Context->preference("LocalCoverImages") ) { $imagenumber = $data->param('imagenumber'); } elsif ( defined $data->param('biblionumber') ) { - my @imagenumbers = ListImagesForBiblio( $data->param('biblionumber') ); + my @imagenumbers = ListImagesForBiblio( $data->multi_param('biblionumber') ); if (@imagenumbers) { $imagenumber = $imagenumbers[0]; } --- a/circ/circulation.pl +++ a/circ/circulation.pl @@ -196,7 +196,7 @@ if ( @$barcodes ) { $stickyduedate = $query->param('stickyduedate'); $duedatespec = $query->param('duedatespec'); } - $session->param('auto_renew', $query->param('auto_renew')); + $session->param('auto_renew', scalar $query->param('auto_renew')); } else { $session->clear('auto_renew'); --- a/svc/config/systempreferences +++ a/svc/config/systempreferences @@ -94,7 +94,7 @@ sub set_preferences { next if ( !defined( $pref ) ); - my $value = join( ',', $query->param( $param ) ); + my $value = join( ',', $query->multi_param( $param ) ); C4::Context->set_preference( $pref, $value ); } --- a/svc/members/search +++ a/svc/members/search @@ -31,7 +31,7 @@ my $input = new CGI; exit unless $input->param('template_path'); my ($template, $user, $cookie) = get_template_and_user({ - template_name => $input->param('template_path'), + template_name => scalar $input->param('template_path'), query => $input, type => "intranet", authnotrequired => 0, --- a/svc/virtualshelves/search +++ a/svc/virtualshelves/search @@ -13,7 +13,7 @@ my $input = new CGI; exit unless $input->param('template_path'); my ($template, $user, $cookie) = get_template_and_user({ - template_name => $input->param('template_path'), + template_name => scalar $input->param('template_path'), query => $input, type => "intranet", authnotrequired => 0, --- a/tools/marc_modification_templates.pl +++ a/tools/marc_modification_templates.pl @@ -42,7 +42,7 @@ my ($template, $loggedinuser, $cookie) if ( $op eq "create_template" ) { $template_id = '' unless $cgi->param('duplicate_current_template'); - $template_id = AddModificationTemplate( $cgi->param('template_name'), $template_id ); + $template_id = AddModificationTemplate( scalar $cgi->param('template_name'), $template_id ); } elsif ( $op eq "delete_template" ) { @@ -103,11 +103,11 @@ if ( $op eq "create_template" ) { } } elsif ( $op eq "delete_action" ) { - DelModificationTemplateAction( $cgi->param('mmta_id') ); + DelModificationTemplateAction( scalar $cgi->param('mmta_id') ); } elsif ( $op eq "move_action" ) { - MoveModificationTemplateAction( $cgi->param('mmta_id'), $cgi->param('where') ); + MoveModificationTemplateAction( scalar $cgi->param('mmta_id'), scalar $cgi->param('where') ); } --