From e87c497f5d395523aee8f08c88da59c8ae131132 Mon Sep 17 00:00:00 2001 From: Joshua Ferraro Date: Sat, 6 Oct 2007 21:41:32 -0500 Subject: [PATCH] Fix for 1279: Detail page should display error message for invalid biblionumbers Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- catalogue/detail.pl | 5 +++++ opac/opac-detail.pl | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 855746bd04..6f301b9b50 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -42,6 +42,11 @@ my $biblionumber = $query->param('biblionumber'); # change back when ive fixed request.pl my @items = &GetItemsInfo( $biblionumber, 'intra' ); my $dat = &GetBiblioData($biblionumber); + +if (!$dat) { + print $query->redirect("/cgi-bin/koha/koha-tmpl/errors/404.pl"); +} + #coping with subscriptions my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber); my @subscriptions = GetSubscriptions( $dat->{title}, $dat->{issn}, $biblionumber ); diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 5266afb683..90e0fbc27c 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -49,6 +49,11 @@ $template->param( biblionumber => $biblionumber ); # change back when ive fixed request.pl my @items = &GetItemsInfo( $biblionumber, 'opac' ); my $dat = &GetBiblioData($biblionumber); + +if (!$dat) { + print $query->redirect("/cgi-bin/koha/koha-tmpl/errors/404.pl"); +} + #coping with subscriptions my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber); my @subscriptions = -- 2.39.5