If xslt was on, an internal server would be thrown if called with an
invalid biblionumber, it now redirects to a 404 page instead.

Next step fix the 404 page to send the right headers.
---
 opac/opac-detail.pl |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl
index c3b104b..9462567 100755
--- a/opac/opac-detail.pl
+++ b/opac/opac-detail.pl
@@ -68,6 +68,11 @@ my $record       = GetMarcBiblio($biblionumber);
 $template->param( biblionumber => $biblionumber );
 # XSLT processing of some stuff
 if (C4::Context->preference("XSLTDetailsDisplay") ) {
+    unless ($record){
+       # If we don't have a record, get the hell out, or we will internal 
server error
+       print $query->redirect("/cgi-bin/koha/errors/404.pl");  
+       exit;
+    }
     $template->param(
         'XSLTBloc' => XSLTParse4Display($biblionumber, $record, 'Detail') );
 }
-- 
1.6.3.3

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to