Load holidays.
authorJan Schneider <jan@horde.org>
Fri, 13 Mar 2009 12:52:26 +0000 (13:52 +0100)
committerJan Schneider <jan@horde.org>
Fri, 13 Mar 2009 12:52:26 +0000 (13:52 +0100)
kronolith/ajax.php
kronolith/lib/Kronolith.php

index fc1f655..2ff04cf 100644 (file)
@@ -75,7 +75,7 @@ case 'ListEvents':
         $driver = 'Ical';
         break;
     case 'holiday':
-        $driver = 'Holiday';
+        $driver = 'Holidays';
         break;
     }
     $kronolith_driver = Kronolith::getDriver($driver, $calendar);
index 60180bf..0c3d4fe 100644 (file)
@@ -172,6 +172,13 @@ class Kronolith
                 'bg' => Kronolith::backgroundColor($calendar),
                 'show' => in_array($calendar['url'], $GLOBALS['display_remote_calendars']));
         }
+        if (!empty($GLOBALS['conf']['holidays']['enable'])) {
+            foreach (unserialize($GLOBALS['prefs']->getValue('holiday_drivers')) as $holiday) {
+                $code['conf']['calendars']['holiday'][$holiday] = array(
+                    'name' => $holiday,
+                    'show' => true);
+            }
+        }
 
         /* Gettext strings used in core javascript files. */
         $code['text'] = array_map('addslashes', array(