X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=cataloguing%2Faddbiblio.pl;h=92abe81082cd6d231fa58180e2d10df813875816;hb=48bf9b1d91dbbc336f859ac1a83d7d25b0e6a3c1;hp=090849da4d271430ea6c22e4bbf807f053f77fc4;hpb=dc30d4c3768146f23931d2c1f97a9669346465fe;p=koha-ffzg.git diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 090849da4d..92abe81082 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -28,7 +28,6 @@ use C4::Biblio qw( AddBiblio DelBiblio GetFrameworkCode - GetMarcBiblio GetMarcFromKohaField GetMarcStructure GetUsedMarcStructure @@ -47,6 +46,7 @@ use C4::Charset qw( SetMarcUnicodeFlag ); use Koha::BiblioFrameworks; use Koha::DateUtils qw( dt_from_string ); +use Koha::Biblios; use Koha::ItemTypes; use Koha::Libraries; @@ -592,7 +592,7 @@ sub build_tabs { } # now, loop again to add parameter subfield that are not in the MARC::Record - foreach my $subfield ( keys %{ $tagslib->{$tag} } ) + foreach my $subfield ( sort( keys %{ $tagslib->{$tag} } ) ) { next if ( length $subfield != 1 ); next if ( $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop ); @@ -749,9 +749,10 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); +my $biblio; if ($biblionumber){ - my $does_bib_exist = Koha::Biblios->find($biblionumber); - if (!defined $does_bib_exist){ + $biblio = Koha::Biblios->find($biblionumber); + unless ( $biblio ) { $biblionumber = undef; $template->param( bib_doesnt_exist => 1 ); } @@ -800,8 +801,8 @@ my ( $biblioitemnumber ); -if (($biblionumber) && !($breedingid)){ - $record = GetMarcBiblio({ biblionumber => $biblionumber }); +if ( $biblio && !$breedingid ) { + $record = $biblio->metadata->record; } if ($breedingid) { ( $record, $encoding ) = MARCfindbreeding( $breedingid ) ;