From 4684d3072ed88041b647b32af4aca5f0d7bec0f1 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 17 May 2016 14:39:49 -0400 Subject: [PATCH] Bug 16539 - Koha::Cache is incorrectly caching single holidays This makes the loop add holidays for each bracnh instead of the calling branch To test: I used memcached-tools to view the cache, clear the cache, and wait for holidays to regnerate Have a branches with different holidays Clear the cache Do a checkout View the cache - one libraries holidays are repeated for all branches Apply patch Clear the cache Do a checkout Library holidays are correctly cached Signed-off-by: Kyle M Hall Signed-off-by: Chris Cormack Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit d6c37a0994fd27e8fdbcc99a70100ea90495c582) Signed-off-by: Julian Maurice --- Koha/Calendar.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Calendar.pm b/Koha/Calendar.pm index a0b642b3cc..093a56e5a2 100644 --- a/Koha/Calendar.pm +++ b/Koha/Calendar.pm @@ -116,7 +116,7 @@ sub single_holidays { my $single_holidays_sth = $dbh->prepare( 'SELECT day, month, year FROM special_holidays WHERE branchcode = ? AND isexception = 0' ); - $single_holidays_sth->execute($branchcode); + $single_holidays_sth->execute($br); my @ymd_arr; while ( my ( $day, $month, $year ) = -- 2.39.5