X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FBiblio.pm;h=5508cbebeb0280d138e3ad807f38106f7e6ded4a;hb=65129084ef2bdc5c4a9dea4f98480b30fc646d98;hp=579ebcf3c3483236720bb2e5c1370bdbe64e5c10;hpb=020c095377971fe70550ef07383bb9092f967946;p=koha_fer diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 579ebcf3c3..5508cbebeb 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1996,6 +1996,7 @@ sub TransformKohaToMarc { my $db_to_marc = C4::Context->marcfromkohafield; while ( my ($name, $value) = each %$hash ) { next unless my $dtm = $db_to_marc->{''}->{$name}; + next unless ( scalar( @$dtm ) ); my ($tag, $letter) = @$dtm; foreach my $value ( split(/\s?\|\s?/, $value, -1) ) { if ( my $field = $record->field($tag) ) { @@ -3468,9 +3469,12 @@ Function exported, but should NOT be used, unless you really know what you're do =cut sub ModBiblioMarc { - - # pass the MARC::Record to this function, and it will create the records in the marc field + # pass the MARC::Record to this function, and it will create the records in + # the marc field my ( $record, $biblionumber, $frameworkcode ) = @_; + + # Clone record as it gets modified + $record = $record->clone(); my $dbh = C4::Context->dbh; my @fields = $record->fields(); if ( !$frameworkcode ) {