Bug 18089 - All XSLT testing singleBranchMode = 0 fails to show even if install has only 1 branch

Due to the way it has been implemented, singleBranchMode is set to an
empty string rather than 0 if there is only one branch. This causes any
block that tests for singleBranchMOde to be 0 to never appear.

Test Plan:
1) Apply this patch set
2) prove t/XSLT.t

Signed-off-by: Jenny Schmidt <jschmidt@switchinc.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Kyle M Hall 2017-02-09 11:48:40 +00:00
parent 99cc3bdd0e
commit ed5cb5fc97
1 changed files with 1 additions and 1 deletions

View File

@ -179,7 +179,7 @@ sub get_xslt_sysprefs {
# singleBranchMode was a system preference, but no longer is
# we can retain it here for compatibility
my $singleBranchMode = Koha::Libraries->search->count == 1;
my $singleBranchMode = Koha::Libraries->search->count == 1 ? 1 : 0;
$sysxml .= "<syspref name=\"singleBranchMode\">$singleBranchMode</syspref>\n";
$sysxml .= "</sysprefs>\n";