diff --git a/tools/batch_delete_records.pl b/tools/batch_delete_records.pl index ea87d8b6c8..dbc7cb1e93 100755 --- a/tools/batch_delete_records.pl +++ b/tools/batch_delete_records.pl @@ -44,13 +44,19 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user({ flagsrequired => { tools => 'records_batchdel' }, }); -$template->param( lists => scalar Koha::Virtualshelves->search([{ category => 1, owner => $loggedinuser }, { category => 2 }]) ); - my @records; my @messages; if ( $op eq 'form' ) { # Display the form - $template->param( op => 'form' ); + $template->param( + op => 'form', + lists => scalar Koha::Virtualshelves->search( + [ + { category => 1, owner => $loggedinuser }, + { category => 2 } + ] + ) + ); } elsif ( $op eq 'list' ) { # List all records to process my @record_ids; diff --git a/tools/batch_record_modification.pl b/tools/batch_record_modification.pl index d118120768..e972bcdf4d 100755 --- a/tools/batch_record_modification.pl +++ b/tools/batch_record_modification.pl @@ -81,6 +81,12 @@ if ( $op eq 'form' ) { # Display the form $template->param( view => 'form', + lists => scalar Koha::Virtualshelves->search( + [ + { category => 1, owner => $loggedinuser }, + { category => 2 } + ] + ) ); } elsif ( $op eq 'list' ) { # List all records to process