This patch is a follow-up of bug 16154.
It removes the warning "CGI::param called in list context" in the
following scripts:
admin/branches.pl
admin/categories.pl
admin/patron-attr-types.pl
admin/preferences.pl
catalogue/image.pl
circ/circulation.pl
patroncards/add_user_search.pl
serials/add_user_search.pl
tools/marc_modification_templates.pl
virtualshelves/shelves.pl
Note that the warning from catalogue/itemsearch.pl still exists (the
call to CGI->param is done from the template).
Test plan:
- 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)
You should not get the warning in the log after all these actions.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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;
}
}
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 );
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' };
( 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' };
$attr_type->authorised_value_category($authorised_value_category);
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 );
$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];
}
$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');
next if ( !defined( $pref ) );
- my $value = join( ',', $query->param( $param ) );
+ my $value = join( ',', $query->multi_param( $param ) );
C4::Context->set_preference( $pref, $value );
}
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" ) {
}
} 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') );
}