X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=catalogue%2FISBDdetail.pl;h=58a8d901c5f4d557014b547fe7ef32142250e3e9;hb=88b7cc2552cfc26868648d29247023bd818b17b9;hp=df84a3ae26fcb07114ff40c06a9c431fdeed6591;hpb=2ea6fdec156419fbbdd5f64da927d0b2b45e751c;p=koha_fer diff --git a/catalogue/ISBDdetail.pl b/catalogue/ISBDdetail.pl index df84a3ae26..58a8d901c5 100755 --- a/catalogue/ISBDdetail.pl +++ b/catalogue/ISBDdetail.pl @@ -67,6 +67,16 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); +my $res = GetISBDView($biblionumber, "intranet"); +if ( not defined $res ) { + # biblionumber invalid -> report and exit + $template->param( unknownbiblionumber => 1, + biblionumber => $biblionumber + ); + output_html_with_http_headers $query, $cookie, $template->output; + exit; +} + if($query->cookie("holdfor")){ my $holdfor_patron = GetMember('borrowernumber' => $query->cookie("holdfor")); $template->param( @@ -77,10 +87,6 @@ if($query->cookie("holdfor")){ ); } -# my @blocs = split /\@/,$ISBD; -# my @fields = $record->fields(); -my $res = GetISBDView($biblionumber, "intranet"); - # count of item linked with biblio my $itemcount = GetItemsCount($biblionumber); $template->param( count => $itemcount); @@ -98,9 +104,9 @@ if ($subscriptionsnumber) { $template->param ( ISBD => $res, biblionumber => $biblionumber, - isbdview => 1, - z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)), - C4::Search::enabled_staff_search_views, + isbdview => 1, + z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)), + C4::Search::enabled_staff_search_views ); output_html_with_http_headers $query, $cookie, $template->output;