From f24750f5ba1a2b6535c76755c5daf27ca260fa0f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 10 Jun 2010 13:28:28 -0400 Subject: [PATCH] Fix for Bug 4886, missing 404 redirection on wrong biblionumber for MARC and ISBD details Signed-off-by: Galen Charlton --- 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 b4a4d3af9b..9b5c031172 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 132d5a6642..fae749c8dc 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( { -- 2.39.5