X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=catalogue%2FMARCdetail.pl;h=04900764029f3c7ad7d503592d3da8756ed8422e;hb=84f53799d7574693e1dd520230a2bba9ab439703;hp=c3cc5d4c95f749bb2ea95d06c39b0b38491efe2d;hpb=4669a10776ff958a3b2d51963b7c4ec90ec02f09;p=koha_gimpoz diff --git a/catalogue/MARCdetail.pl b/catalogue/MARCdetail.pl index c3cc5d4c95..0490076402 100755 --- a/catalogue/MARCdetail.pl +++ b/catalogue/MARCdetail.pl @@ -70,10 +70,6 @@ my $popup = ; # if set to 1, then don't insert links, it's just to show the biblio my $subscriptionid = $query->param('subscriptionid'); -my $tagslib = &GetMarcStructure(1,$frameworkcode); - -my $record = GetMarcBiblio($biblionumber); -my $biblio = GetBiblioData($biblionumber); # open template my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { @@ -86,6 +82,21 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); +my $record = GetMarcBiblio($biblionumber); +$template->param( ocoins => GetCOinSBiblio($record) ); + +if ( not defined $record ) { + # biblionumber invalid -> report and exit + $template->param( unknownbiblionumber => 1, + biblionumber => $biblionumber + ); + output_html_with_http_headers $query, $cookie, $template->output; + exit; +} + +my $tagslib = &GetMarcStructure(1,$frameworkcode); +my $biblio = GetBiblioData($biblionumber); + if($query->cookie("holdfor")){ my $holdfor_patron = GetMember('borrowernumber' => $query->cookie("holdfor")); $template->param(