From f72902ec5fe434d67953ba104ad868f228f4dbb4 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Sat, 1 Mar 2008 06:09:49 +1300 Subject: [PATCH] bugfixing holidays.pl + let the superlibrarians choose their branch even if IndepBranches is ON Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- tools/holidays.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/holidays.pl b/tools/holidays.pl index 9f81511f83..9dd93f0c59 100755 --- a/tools/holidays.pl +++ b/tools/holidays.pl @@ -114,8 +114,9 @@ foreach my $yearMonthDay (keys %$single_holidays) { # Replace the template values with the real ones # If we have independent branches on we need to only let the user set holidays for their branch -if ( C4::Context->preference("IndependantBranches") ) { - $template->param(BRANCHES => C4::Context->userenv->{'branchname'}); +# (except if the user is superlibrarian, in which case he can choose the branch anyway) +if ( C4::Context->preference("IndependantBranches") && !(C4::Context->userenv->{'flags'} % 2) ) { + $template->param(BRANCHES => C4::Context->userenv->{'branchname'}.""); } else { $template->param(BRANCHES => $branchesList); -- 2.39.5