From 542c93c90ae28a7a46eeae9a34dd91eb96883f9e Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 10 Jun 2010 13:20:54 -0400 Subject: [PATCH] Fix for Bug 4886, missing 404 redirection on wrong biblionumber for MARC and ISBD details --- opac/opac-ISBDdetail.pl | 5 ++++- opac/opac-MARCdetail.pl | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl index b4a4d3a..9b5c031 100755 --- a/opac/opac-ISBDdetail.pl +++ b/opac/opac-ISBDdetail.pl @@ -75,7 +75,10 @@ $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); my $marcflavour = C4::Context->preference("marcflavour"); my $record = GetMarcBiblio($biblionumber); - +if ( ! $record ) { + print $query->redirect("/cgi-bin/koha/errors/404.pl"); + exit; +} # some useful variables for enhanced content; # in each case, we're grabbing the first value we find in # the record and normalizing it diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl index 132d5a6..fae749c 100755 --- a/opac/opac-MARCdetail.pl +++ b/opac/opac-MARCdetail.pl @@ -60,7 +60,10 @@ my $itemtype = &GetFrameworkCode($biblionumber); my $tagslib = &GetMarcStructure( 0, $itemtype ); my $biblio = GetBiblioData($biblionumber); my $record = GetMarcBiblio($biblionumber); - +if ( ! $record ) { + print $query->redirect("/cgi-bin/koha/errors/404.pl"); + exit; +} # open template my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { -- 1.7.0.4