Bug 19074: Fix category display in Batch patron modification.
[koha.git] / tools / batch_record_modification.pl
index 50a2b50..89527fb 100755 (executable)
@@ -29,6 +29,8 @@ use C4::AuthoritiesMarc qw( BuildSummary ModAuthority );
 use C4::BackgroundJob;
 use C4::Biblio qw( GetMarcBiblio ModBiblio );
 use C4::MarcModificationTemplates qw( GetModificationTemplateActions GetModificationTemplates ModifyRecordWithTemplate );
+
+use Koha::Biblios;
 use Koha::MetadataRecord::Authority;
 
 my $input = new CGI;
@@ -116,7 +118,7 @@ if ( $op eq 'form' ) {
     for my $record_id ( uniq @record_ids ) {
         if ( $recordtype eq 'biblio' ) {
             # Retrieve biblio information
-            my $biblio = C4::Biblio::GetBiblio( $record_id );
+            my $biblio = Koha::Biblios->find( $record_id );
             unless ( $biblio ) {
                 push @messages, {
                     type => 'warning',
@@ -151,7 +153,7 @@ if ( $op eq 'form' ) {
     );
 } elsif ( $op eq 'modify' ) {
     # We want to modify selected records!
-    my @record_ids = $input->param('record_id');
+    my @record_ids = $input->multi_param('record_id');
 
     my ( $job );
     if ( $runinbackground ) {