]> git.koha-community.org Git - koha.git/commit
bug 10292: improve fallback logic for picking XSLT
authorGalen Charlton <gmc@esilibrary.com>
Mon, 20 May 2013 17:12:44 +0000 (10:12 -0700)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Tue, 4 Jun 2013 15:40:21 +0000 (12:40 -0300)
commitd68bb6b8c03c1d538b29448b5baf0dfb13cca736
tree3b6eea1b85c31e5a9798fdc4c78a11c3650a75d0
parent85536020599855d6ae89aa1d66e05adc1c705f0e
bug 10292: improve fallback logic for picking XSLT

This patch fixes a bug whereby XSLT files from the
prog theme would be used (for English OPACs and staff
interfaces) even if the user had created and enabled a
custom theme that provided override XSLT files.

This patch provides a clearer implementation of the fallback
logic and adds test cases.

To reproduce the bug:

[1] Set OPACXSLTDetailsDisplay to 'default' and English as the OPAC
    language.
[2] Create a new OPAC theme, including copying the XSLT files.
[3] Set opactheme to the new theme.
[4] Make a change to koha-tmpl/opac-tmpl/NEWTHEME/en/xslt/MARC21slim2OPACDetail.xsl
[5] View a bib record in the OPAC. The change made in the previous step
    is not reflected.

To test after applying the patch:

[6] Reload the bib record in the OPAC. The change made in step 4 should
    now be reflected.
[7] (To be thorough) Go through the test plan for bug 8947
    and verify that there is no regression.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b0eeb00d48892c2ea7f42d787dae10364537ed6f)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/XSLT.pm
t/XSLT.t