From: Jan Schneider Date: Fri, 13 Mar 2009 12:52:26 +0000 (+0100) Subject: Load holidays. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=326a92239e53d874f535aeff87ffbcbd335d94a9;p=horde.git Load holidays. --- diff --git a/kronolith/ajax.php b/kronolith/ajax.php index fc1f655e6..2ff04cf27 100644 --- a/kronolith/ajax.php +++ b/kronolith/ajax.php @@ -75,7 +75,7 @@ case 'ListEvents': $driver = 'Ical'; break; case 'holiday': - $driver = 'Holiday'; + $driver = 'Holidays'; break; } $kronolith_driver = Kronolith::getDriver($driver, $calendar); diff --git a/kronolith/lib/Kronolith.php b/kronolith/lib/Kronolith.php index 60180bf14..0c3d4fe5f 100644 --- a/kronolith/lib/Kronolith.php +++ b/kronolith/lib/Kronolith.php @@ -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(