]> git.koha-community.org Git - koha.git/commit
Bug 17982: Fix the use of uniq in sub themelanguage
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tue, 24 Jan 2017 15:39:28 +0000 (16:39 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Tue, 14 Feb 2017 14:09:52 +0000 (14:09 +0000)
commit5c1daf010ec97ed405bf7825eaa8143c225252b1
treecb695d920e34a98b263d0dc04329827d5cc7e043
parent460c9b1b1594b8beebedbc28809fe47bc8d3313c
Bug 17982: Fix the use of uniq in sub themelanguage

Doing uniq( \@themes ) is useless. It will just return to you the only
reference you gave it.
List::MoreUtils::uniq requires a list instead of an arrayref.
So it is a trivial fix that makes sub themelanguage return one theme instead
of three themes like [ 'prog', 'prog',  'prog' ].
Note that Template->new inserts one or two include paths to TT for each of
these three identical themes.

Test plan:
[1] Run t/db_dependent/Templates.t (should no longer fail)
[2] Run t/db_dependent/Auth.t (triggering themelanguage)
[3] Open a page on OPAC or intranet. (Did you restart Plack?)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
EDIT (Marcel): Amended test plan for additional unit test.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Templates.pm