abstract protected function _list($user, Horde_Date $time);
/**
+ * Returns a list of all global alarms from the backend.
+ *
+ * @return array A list of alarm hashes.
+ * @throws Horde_Alarm_Exception
+ */
+ public function globalAlarms()
+ {
+ $alarms = $this->_global();
+ foreach (array_keys($alarms) as $alarm) {
+ if (isset($alarms[$alarm]['mail']['body'])) {
+ $alarms[$alarm]['mail']['body'] = $this->_fromDriver($alarms[$alarm]['mail']['body']);
+ }
+ }
+ return $alarms;
+ }
+
+ /**
+ * Returns a list of all global alarms from the backend.
+ *
+ * @return array A list of alarm hashes.
+ */
+ abstract protected function _global();
+
+ /**
* Returns an alarm hash from the backend.
*
* @param string $id The alarm's unique id.
}
/**
+ * Returns a list of all global alarms from the backend.
+ *
+ * @return array A list of alarm hashes.
+ * @throws Horde_Alarm_Exception
+ */
+ protected function _global()
+ {
+ $query = sprintf('SELECT alarm_id, alarm_uid, alarm_start, alarm_end, alarm_methods, alarm_params, alarm_title, alarm_text, alarm_snooze, alarm_internal FROM %s WHERE alarm_uid IS NULL OR alarm_uid = \'\' ORDER BY alarm_start, alarm_end',
+ $this->_params['table']);
+
+ try {
+ $result = $this->_db->selectAll($query);
+ } catch (Horde_Db_Exception $e) {
+ throw new Horde_Alarm_Exception($e);
+ }
+
+ $alarms = array();
+ foreach ($result as $val) {
+ $alarms[] = $this->_getHash($val);
+ }
+
+ return $alarms;
+ }
+
+ /**
*/
protected function _getHash(array $alarm)
{
}
try {
- $alarms = $horde_alarm->listAlarms('');
+ $alarms = $horde_alarm->globalAlarms();
} catch (Horde_Alarm_Exception $e) {
$alarms = $e;
}
v3.3.9-cvs
----------
+[jan] Show future alarms in the alarm management screen too.
[mjr] Fix bug in Horde_Cache that would prevent cache entries from being
expired in certain cases, and prevent cache key collisions.