Bug 20811: Fix wrong usage of ModBiblio

Since
  commit cefa7c21e2
  Bug 5635: bulkmarcimport new parameters & features

AddBiblio call has been replaced with ModBiblio, but the return values
are different. We should not replace the value of $biblionumber with
what returns this subroutine.

Test plan:
If you are familiar with bulkmarcimport.pl you should know what to test,
I am not.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2018-05-28 15:19:09 -03:00 committed by Nick Clemens
parent 574cc2f787
commit d15185025a

View file

@ -451,7 +451,7 @@ RECORD: while ( ) {
$biblioitemnumber = Koha::Biblios->find( $biblionumber )->biblioitem->biblioitemnumber;
};
if ($update) {
eval { ( $biblionumber, $biblioitemnumber ) = ModBiblio( $record, $biblionumber, GetFrameworkCode($biblionumber) ) };
eval { ModBiblio( $record, $biblionumber, GetFrameworkCode($biblionumber) ) };
if ($@) {
warn "ERROR: Edit biblio $biblionumber failed: $@\n";
printlog( { id => $id || $originalid || $biblionumber, op => "update", status => "ERROR" } ) if ($logfile);