Bugzilla – Attachment 7022 Details for
Bug 7394
Broken detail page for last link from result page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Signed-off patch
0001-Bug-7394-Fixing-scoping-issue-with-XSLT-processing.-.patch (text/plain), 2.78 KB, created by
Frédéric Demians
on 2012-01-03 07:16:44 UTC
(
hide
)
Description:
Signed-off patch
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2012-01-03 07:16:44 UTC
Size:
2.78 KB
patch
obsolete
>From 0322dada6e2877cec998a3bfc3fd707e44c8a196 Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chrisc@catalyst.net.nz> >Date: Tue, 3 Jan 2012 19:57:41 +1300 >Subject: [PATCH] Bug 7394 : Fixing scoping issue with XSLT processing. Also > bailing out early for 404 inestead of doing unnessecary > processing >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Frédéric Demians <f.demians@tamil.fr> > >I can confirm the bug and the solution. >--- > C4/XSLT.pm | 2 +- > opac/opac-detail.pl | 28 ++++++++++++++++------------ > 2 files changed, 17 insertions(+), 13 deletions(-) > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index 39071d5..d22a3ac 100755 >--- a/C4/XSLT.pm >+++ b/C4/XSLT.pm >@@ -58,7 +58,7 @@ Replaces codes with authorized values in a MARC::Record object > > sub transformMARCXML4XSLT { > my ($biblionumber, $record) = @_; >- my $frameworkcode = GetFrameworkCode($biblionumber); >+ my $frameworkcode = GetFrameworkCode($biblionumber) || ''; > my $tagslib = &GetMarcStructure(1,$frameworkcode); > my @fields; > # FIXME: wish there was a better way to handle exceptions >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index f82dde2..1c65c73 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -66,6 +66,22 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > > my $biblionumber = $query->param('biblionumber') || $query->param('bib'); > >+my $record = GetMarcBiblio($biblionumber); >+if ( ! $record ) { >+ print $query->redirect("/cgi-bin/koha/errors/404.pl"); # escape early >+ exit; >+} >+$template->param( biblionumber => $biblionumber ); >+ >+ >+SetUTF8Flag($record); >+ >+# XSLT processing of some stuff >+if (C4::Context->preference("OPACXSLTDetailsDisplay") ) { >+ $template->param( 'XSLTBloc' => XSLTParse4Display($biblionumber, $record, 'Detail', 'opac') ); >+} >+ >+ > # We look for the busc param to build the simple paging from the search > my $session = get_session($query->cookie("CGISESSID")); > my %paging = (previous => {}, next => {}); >@@ -351,19 +367,7 @@ if ($session->param('busc')) { > $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); > $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); > >-my $record = GetMarcBiblio($biblionumber); >-if ( ! $record ) { >- print $query->redirect("/cgi-bin/koha/errors/404.pl"); >- exit; >-} >-$template->param( biblionumber => $biblionumber ); > >-SetUTF8Flag($record); >- >-# XSLT processing of some stuff >-if (C4::Context->preference("OPACXSLTDetailsDisplay") ) { >- $template->param( 'XSLTBloc' => XSLTParse4Display($biblionumber, $record, 'Detail', 'opac') ); >-} > > $template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") ); > # change back when ive fixed request.pl >-- >1.7.8 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7394
:
7013
|
7021
|
7022
|
7023
|
7024