From: Michael J. Rubinsky Date: Mon, 21 Sep 2009 04:57:19 +0000 (-0400) Subject: Only set the default alarm value on the Sql and Kolab Event objects. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=8c43935f46a0c8968926cb413d5fa6e726d2805b;p=horde.git Only set the default alarm value on the Sql and Kolab Event objects. Bug: 8588 --- diff --git a/kronolith/lib/Event.php b/kronolith/lib/Event.php index 2c89d9618..a39ba10d3 100644 --- a/kronolith/lib/Event.php +++ b/kronolith/lib/Event.php @@ -218,14 +218,6 @@ abstract class Kronolith_Event */ public function __construct($driver, $eventObject = null) { - static $alarm; - - /* Set default alarm value. */ - if (!isset($alarm) && isset($GLOBALS['prefs'])) { - $alarm = $GLOBALS['prefs']->getValue('default_alarm'); - } - $this->alarm = $alarm; - $this->_calendar = $driver->getCalendar(); // FIXME: Move color definitions anywhere else. if (!empty($this->_calendar) && diff --git a/kronolith/lib/Event/Kolab.php b/kronolith/lib/Event/Kolab.php index f64bd3c47..6e5a35f2a 100644 --- a/kronolith/lib/Event/Kolab.php +++ b/kronolith/lib/Event/Kolab.php @@ -19,6 +19,28 @@ class Kronolith_Event_Kolab extends Kronolith_Event */ protected $_calendarType = 'internal'; + /** + * Const'r + * + * @param Kronolith_Driver $driver The backend driver that this event is + * stored in. + * @param mixed $eventObject Backend specific event object + * that this will represent. + */ + public function __construct($driver, $eventObject = null) + { + static $alarm; + + /* Set default alarm value. */ + if (!isset($alarm) && isset($GLOBALS['prefs'])) { + $alarm = $GLOBALS['prefs']->getValue('default_alarm'); + } + + $this->alarm = $alarm; + + parent::__construct($driver, $eventObject); + } + public function fromDriver($event) { $this->eventID = $event['uid']; diff --git a/kronolith/lib/Event/Sql.php b/kronolith/lib/Event/Sql.php index 7edc9cd13..05161eb64 100644 --- a/kronolith/lib/Event/Sql.php +++ b/kronolith/lib/Event/Sql.php @@ -24,6 +24,28 @@ class Kronolith_Event_Sql extends Kronolith_Event */ private $_properties = array(); + /** + * Const'r + * + * @param Kronolith_Driver $driver The backend driver that this event is + * stored in. + * @param mixed $eventObject Backend specific event object + * that this will represent. + */ + public function __construct($driver, $eventObject = null) + { + static $alarm; + + /* Set default alarm value. */ + if (!isset($alarm) && isset($GLOBALS['prefs'])) { + $alarm = $GLOBALS['prefs']->getValue('default_alarm'); + } + + $this->alarm = $alarm; + + parent::__construct($driver, $eventObject); + } + public function fromDriver($SQLEvent) { $driver = $this->getDriver();