Bug 3213 - UNIMARC/MARC21 selection
authorFrédéric Demians <f.demians@tamil.fr>
Mon, 11 May 2009 11:41:49 +0000 (13:41 +0200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 16 Sep 2009 21:19:34 +0000 (23:19 +0200)
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 <galen.charlton@liblime.com>
C4/XSLT.pm
opac/opac-detail.pl

index 29d026e..1073a2d 100644 (file)
@@ -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;
index c29853f..e697d3b 100755 (executable)
@@ -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