From 2403255d0b82dfa148e19710cf5782e9e358d211 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Mon, 11 May 2009 13:41:49 +0200 Subject: [PATCH] Bug 3213 - UNIMARC/MARC21 selection Modify how XSLT stylesheet are choosen depending on 'marcflavour' syspref. DOCUMENTATION: XSLTResultsDisplay and XSLTDetailsDisplay sysprefs aren't MARC21-only anymore. Signed-off-by: Galen Charlton --- C4/XSLT.pm | 3 ++- opac/opac-detail.pl | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 29d026eb9c..1073a2d62d 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -53,7 +53,8 @@ C4::XSLT - Functions for displaying XSLT-generated content =cut sub transformMARCXML4XSLT { - my ($biblionumber, $record) = @_; + my ($biblionumber, $orig_record) = @_; + my $record = $orig_record->clone(); # not updating original record; this may be unnecessarily paranoid my $frameworkcode = GetFrameworkCode($biblionumber); my $tagslib = &GetMarcStructure(1,$frameworkcode); my @fields; diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index c29853f96a..e697d3b1b3 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -62,8 +62,8 @@ my $record = GetMarcBiblio($biblionumber); $template->param( biblionumber => $biblionumber ); # XSLT processing of some stuff if (C4::Context->preference("XSLTDetailsDisplay") ) { - my $newxmlrecord = XSLTParse4Display($biblionumber,$record,'Detail'); - $template->param('XSLTBloc' => $newxmlrecord); + $template->param( + 'XSLTBloc' => XSLTParse4Display($biblionumber, $record, 'Detail') ); } # change back when ive fixed request.pl -- 2.39.5