X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=catalogue%2FMARCdetail.pl;h=04900764029f3c7ad7d503592d3da8756ed8422e;hb=791fe1bbd7ccf58110fa0da9f751eccb199a6c47;hp=c3cc5d4c95f749bb2ea95d06c39b0b38491efe2d;hpb=63541e4223224831e4eb2bb51d108cc4a2155388;p=koha.git 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(