[Koha-patches] [PATCH 1/3] Bug 8418 - Koha::Calendar is_holiday ignores repeating holidays

Dobrica Pavlinusic dpavlin at rot13.org
Wed Jul 11 19:45:13 CEST 2012


This is simple fix since day_month_closed_days hash has wrong arguments order.
---
 Koha/Calendar.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Koha/Calendar.pm b/Koha/Calendar.pm
index dc132cd..ab01e53 100644
--- a/Koha/Calendar.pm
+++ b/Koha/Calendar.pm
@@ -150,7 +150,7 @@ sub is_holiday {
     $dt->truncate( to => 'days' );
     my $day   = $dt->day;
     my $month = $dt->month;
-    if ( exists $self->{day_month_closed_days}->{$month}->{$day} ) {
+    if ( exists $self->{day_month_closed_days}->{$day}->{$month} ) {
         return 1;
     }
     if ( $self->{exception_holidays}->contains($dt) ) {
-- 
1.7.2.5



More information about the Koha-patches mailing list