From 060dc2ad5b199c0fc658c0cd2618b80d1eb6eec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Sun, 2 Nov 2014 08:59:30 +0100 Subject: [PATCH] Bug 13170 Remove of prog theme broke the OPAC's "view plain" option for MARC details In the OPAC if you view the MARC details for a title (and have OPACXSLTDetailsDisplay enabled) there is a "view plain" link which displays the output of opac-showmarc.pl. This is broken in master: fixed by this patch. Test plan: (1) Set OPACXSLTDetailsDisplay to default (2) Do a search on OPAC, then display a specific biblio record (3) Click on MARC view tab. Then click on 'view plain' link. Nothing is displayed. (4) Apply the patch. And refresh the MARC detail page. (5) Click on 'view plain' link. Check that a plain text MARC record is displayed. --- opac/opac-showmarc.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opac/opac-showmarc.pl b/opac/opac-showmarc.pl index 702fb1b..0a18bda 100755 --- a/opac/opac-showmarc.pl +++ b/opac/opac-showmarc.pl @@ -66,9 +66,9 @@ if ($view eq 'card' || $view eq 'html') { $xslfile = 'plainMARC.xsl'; } $xslfilename = "$htdocs/$theme/$lang/xslt/$xslfile"; - $xslfilename = "$htdocs/$theme/en/xslt/$xslfile" unless ( $lang ne 'en' && -f $xslfilename ); - $xslfilename = "$htdocs/prog/$lang/xslt/$xslfile" unless ( -f $xslfile ); - $xslfilename = "$htdocs/prog/en/xslt/$xslfile" unless ( $lang ne 'en' && -f $xslfilename ); + $xslfilename = "$htdocs/$theme/en/xslt/$xslfile" unless -f $xslfilename; + $xslfilename = "$htdocs/bootstrap/$lang/xslt/$xslfile" unless -f $xslfilename; + $xslfilename = "$htdocs/bootstrap/en/xslt/$xslfile" unless -f $xslfilename; my $newxmlrecord = C4::XSLT::engine->transform($xmlrecord, $xslfilename); print $input->header(-charset => 'UTF-8'), Encode::encode_utf8($newxmlrecord); -- 2.1.2