Fix for Bug 4886, missing 404 redirection on wrong biblionumber for MARC and ISBD...
authorOwen Leonard <oleonard@myacpl.org>
Thu, 10 Jun 2010 17:28:28 +0000 (13:28 -0400)
committerGalen Charlton <gmcharlt@gmail.com>
Thu, 24 Jun 2010 02:50:19 +0000 (22:50 -0400)
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
opac/opac-ISBDdetail.pl
opac/opac-MARCdetail.pl

index b4a4d3a..9b5c031 100755 (executable)
@@ -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
index 132d5a6..fae749c 100755 (executable)
@@ -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(
     {