Bug 12237: Remove the "horrible hack" in C4::Templates
authorJulian Maurice <julian.maurice@biblibre.com>
Tue, 13 May 2014 08:21:43 +0000 (10:21 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 3 Jul 2014 13:34:11 +0000 (10:34 -0300)
commita0c17a8c3aa7701cad41aeefe2347671e2a12ebf
tree60afe2730befef9024c0cff4eadda8bec8b2c7ad
parentfb772f1a90624918027087b1af496377c5de7748
Bug 12237: Remove the "horrible hack" in C4::Templates

Use C4::Languages::getlanguage() instead of
C4::Templates::_current_language()

Test plan:
1/ Set one of the 4 XSLT sysprefs to 'default'
2/ Go to the corresponding page
3/ Switch language and check that the right XSLT is used
4/ Set the same syspref to something with '{langcode}' in it. For
example:
"../koha-tmpl/opac-tmpl/bootstrap/{langcode}/xslt/UNIMARCslim2OPACDetail.xsl"
5/ Go back to the corresponding page
6/ Switch language and check that the right XSLT is used
7/ Change a compact.xsl for a language (for example
koha-tmpl/intranet-tmpl/prog/fr-FR/xslt/compact.xsl) to be able to see
differences
8/ Go to a biblio detail page in staff interface and click on "MARC
Preview: Show"
9/ Close the popup, switch language and click again on the same link
10/ Check that the correct XSLT is used.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described following test plan.
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
No problems found, passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/Templates.pm
C4/XSLT.pm
catalogue/showmarc.pl
opac/opac-showmarc.pl