diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index afef9c8189..7e367c889f 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -682,7 +682,7 @@ sub AddAuthority { =head2 DelAuthority - $authid = DelAuthority( $authid ) + DelAuthority( $authid ) Deletes $authid and calls merge to cleanup in linked biblio records diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm index 88d670d598..14364f4a14 100644 --- a/C4/ImportBatch.pm +++ b/C4/ImportBatch.pm @@ -852,7 +852,7 @@ sub BatchRevertRecords { $num_items_deleted += BatchRevertItems($rowref->{'import_record_id'}, $rowref->{'matched_biblionumber'}); $error = DelBiblio($rowref->{'matched_biblionumber'}); } else { - my $deletedauthid = DelAuthority($rowref->{'matched_authid'}); + DelAuthority( $rowref->{'matched_authid'} ); } if (defined $error) { $num_errors++; diff --git a/tools/batch_delete_records.pl b/tools/batch_delete_records.pl index 2c2d32e407..2b82796541 100755 --- a/tools/batch_delete_records.pl +++ b/tools/batch_delete_records.pl @@ -198,8 +198,8 @@ if ( $op eq 'form' ) { } else { # Authorities my $authid = $record_id; - my $r = eval { C4::AuthoritiesMarc::DelAuthority( $authid ) }; - if ( $r eq '0E0' or $@ ) { + eval { C4::AuthoritiesMarc::DelAuthority( $authid ) }; + if ( $@ ) { push @messages, { type => 'error', code => 'authority_not_deleted',