From c622e8df475f742cf95c71e09c23529659457958 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 9 Feb 2017 11:48:40 +0000 Subject: [PATCH] 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 Signed-off-by: Kyle M Hall Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit ed5cb5fc9727ca09deb392f4392c1aa35b4e47a5) Signed-off-by: Katrin Fischer --- C4/XSLT.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index a8294020ed..b757f8ff8b 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -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 .= "$singleBranchMode\n"; $sysxml .= "\n"; -- 2.39.5