require_once HORDE_BASE . '/lib/core.php';
/* Notification system. */
-$notification = &Notification::singleton();
+$notification = &Horde_Notification::singleton();
$notification->attach('status');
/* Registry. */
if (is_a(($pushed = $registry->pushApp('babel', !defined('AUTH_HANDLER'))), 'PEAR_Error')) {
if ($pushed->getCode() == 'permission_denied') {
- Horde::authenticationFailureRedirect();
+ Horde::authenticationFailureRedirect();
}
Horde::fatal($pushed, __FILE__, __LINE__, false);
}
define('CHORA_TEMPLATES', $registry->get('templates'));
// Notification system.
-$notification = &Notification::singleton();
+$notification = &Horde_Notification::singleton();
$notification->attach('status');
// Chora base library.
@define('CRUMB_TEMPLATES', $registry->get('templates'));
// Notification system.
-$notification = &Notification::singleton();
+$notification = &Horde_Notification::singleton();
$notification->attach('status');
// Define the base file path of Crumb.
}
// Notification system.
-$notification = &Notification::singleton();
+$notification = &Horde_Notification::singleton();
$notification->attach('status');
// Fima base library
define('FOLKS_TEMPLATES', $registry->get('templates'));
// Notification system.
-$notification = &Notification::singleton();
+$notification = &Horde_Notification::singleton();
$notification->attach('status');
// Define the base file path of Folks.
--- /dev/null
+<?php
+/**
+ * The IMP_Notification_Listener_StatusDimp:: class extends the
+ * IMP_Notification_Listener_StatusImp:: class to return all messages instead
+ * of printing them.
+ *
+ * Copyright 2005-2009 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author Jan Schneider <jan@horde.org>
+ * @package Horde_Notification
+ */
+class IMP_Notification_Listener_StatusDimp extends IMP_Notification_Listener_StatusImp
+{
+ /**
+ * The notified message stack.
+ *
+ * @var array
+ */
+ protected $_messageStack = array();
+
+ /**
+ * Returns all status message if there are any on the 'status' message
+ * stack.
+ *
+ * @param array &$messageStack The stack of messages.
+ * @param array $options An array of options.
+ */
+ public function notify(&$messageStack, $options = array())
+ {
+ while ($message = array_shift($messageStack)) {
+ $event = @unserialize($message['event']);
+ $this->_messageStack[] = array('type' => $message['type'],
+ 'flags' => $message['flags'],
+ 'message' => is_object($event)
+ ? $event->getMessage()
+ : null);
+ }
+ }
+
+ /**
+ * Handle every message of type dimp.*; otherwise delegate back to
+ * the parent.
+ *
+ * @param string $type The message type in question.
+ *
+ * @return boolean Whether this listener handles the type.
+ */
+ public function handles($type)
+ {
+ return (substr($type, 0, 5) == 'dimp.') || parent::handles($type);
+ }
+
+ /**
+ * Returns the message stack.
+ * To return something useful, notify() needs to be called first.
+ *
+ * @param boolean $encode Encode HTML entities?
+ *
+ * @return array List of message hashes.
+ */
+ public function getStack($encode = false)
+ {
+ $msgs = $this->_messageStack;
+ if (!$encode) {
+ return $msgs;
+ }
+
+ for ($i = 0, $mcount = count($msgs); $i < $mcount; ++$i) {
+ if (!in_array('content.raw', $this->getFlags($msgs[$i]))) {
+ $msgs[$i]['message'] = htmlspecialchars($msgs[$i]['message'], ENT_COMPAT, NLS::getCharset());
+ }
+ }
+
+ return $msgs;
+ }
+
+}
--- /dev/null
+<?php
+/**
+ * The IMP_Notification_Listener_StatusImp:: class extends the
+ * Notification_Listener_status:: class to display the messages for
+ * IMP's special message types 'imp.forward' and 'imp.reply'.
+ *
+ * @author Chuck Hagenbuch <chuck@horde.org>
+ * @package Horde_Notification
+ */
+class IMP_Notification_Listener_StatusImp extends Horde_Notification_Listener_Status
+{
+ /**
+ * Constructor.
+ */
+ public function __construct()
+ {
+ parent::__construct();
+ $this->_handles['imp.reply'] = true;
+ $this->_handles['imp.forward'] = true;
+ $this->_handles['imp.redirect'] = true;
+ }
+
+ /**
+ * Outputs one message if it's an IMP message or calls the parent
+ * method otherwise.
+ *
+ * @param array $message One message hash from the stack.
+ */
+ public function getMessage($message)
+ {
+ $event = $this->getEvent($message);
+ switch ($message['type']) {
+ case 'imp.reply':
+ return '<p class="notice">' . Horde::img('mail_answered.png') . ' ' . $event->getMessage() . '</p>';
+
+ case 'imp.forward':
+ case 'imp.redirect':
+ return '<p class="notice">' . Horde::img('mail_forwarded.png') . ' ' . $event->getMessage() . '</p>';
+ }
+
+ return parent::getMessage($message);
+ }
+
+}
+++ /dev/null
-<?php
-
-require_once IMP_BASE . '/lib/Notification/Listener/status.php';
-require_once 'Horde/Notification/Event.php';
-
-/**
- * The Notification_Listener_status_dimp:: class extends the
- * Notification_Listener_status_imp:: class to return all messages instead of
- * printing them.
- *
- * Copyright 2005-2009 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (GPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
- *
- * @author Jan Schneider <jan@horde.org>
- * @package Horde_Notification
- */
-class Notification_Listener_status_dimp extends Notification_Listener_status_imp {
-
- /**
- * The notified message stack.
- *
- * @var array
- */
- var $_messageStack = array();
-
- /**
- * Returns all status message if there are any on the 'status' message
- * stack.
- *
- * @param array &$messageStack The stack of messages.
- * @param array $options An array of options.
- */
- function notify(&$messageStack, $options = array())
- {
- while ($message = array_shift($messageStack)) {
- $event = @unserialize($message['event']);
- $this->_messageStack[] = array('type' => $message['type'],
- 'flags' => $message['flags'],
- 'message' => is_object($event)
- ? $event->getMessage()
- : null);
- }
- }
-
- /**
- * Handle every message of type dimp.*; otherwise delegate back to
- * the parent.
- *
- * @param string $type The message type in question.
- *
- * @return boolean Whether this listener handles the type.
- */
- function handles($type)
- {
- if (substr($type, 0, 5) == 'dimp.') {
- return true;
- }
- return parent::handles($type);
- }
-
- /**
- * Returns the message stack.
- * To return something useful, notify() needs to be called first.
- *
- * @param boolean $encode Encode HTML entities?
- *
- * @return array List of message hashes.
- */
- function getStack($encode = false)
- {
- $msgs = $this->_messageStack;
- if (!$encode) {
- return $msgs;
- }
-
- for ($i = 0, $mcount = count($msgs); $i < $mcount; ++$i) {
- if (!in_array('content.raw', $this->getFlags($msgs[$i]))) {
- $msgs[$i]['message'] = htmlspecialchars($msgs[$i]['message'], ENT_COMPAT, NLS::getCharset());
- }
- }
-
- return $msgs;
- }
-
-}
+++ /dev/null
-<?php
-
-require_once 'Horde/Notification/Listener/status.php';
-
-/**
- * The Notification_Listener_status_imp:: class extends the
- * Notification_Listener_status:: class to display the messages for
- * IMP's special message types 'imp.forward' and 'imp.reply'.
- *
- * @author Chuck Hagenbuch <chuck@horde.org>
- * @package Horde_Notification
- */
-class Notification_Listener_status_imp extends Notification_Listener_status {
-
- /**
- * Constructor
- */
- function Notification_Listener_status_imp()
- {
- parent::Notification_Listener_status();
- $this->_handles['imp.reply'] = true;
- $this->_handles['imp.forward'] = true;
- $this->_handles['imp.redirect'] = true;
- }
-
- /**
- * Outputs one message if it's an IMP message or calls the parent
- * method otherwise.
- *
- * @param array $message One message hash from the stack.
- */
- function getMessage($message)
- {
- $event = $this->getEvent($message);
- switch ($message['type']) {
- case 'imp.reply':
- return '<p class="notice">' . Horde::img('mail_answered.png') . ' ' . $event->getMessage() . '</p>';
-
- case 'imp.forward':
- case 'imp.redirect':
- return '<p class="notice">' . Horde::img('mail_forwarded.png') . ' ' . $event->getMessage() . '</p>';
- }
-
- return parent::getMessage($message);
- }
-
-}
* Global variables defined:
* $imp_imap - An IMP_Imap object
* $imp_mbox - Current mailbox information
- * $imp_notify - A Notification_Listener_Mobile object
+ * $imp_notify - A Horde_Notification_Listener object
* $imp_search - An IMP_Search object
* $mimp_render - (MIMP view only) A Horde_Mobile object
*
}
// Notification system.
-$notification = &Notification::singleton();
+$notification = &Horde_Notification::singleton();
if (($viewmode == 'mimp') ||
(Horde_Util::nonInputVar('login_page') && $GLOBALS['browser']->isMobile())) {
- require_once 'Horde/Notification/Listener/mobile.php';
- $GLOBALS['imp_notify'] = &$notification->attach('status', null, 'Notification_Listener_mobile');
+ $GLOBALS['imp_notify'] = &$notification->attach('status', null, 'Horde_Notification_Listener_Mobile');
} elseif ($viewmode == 'dimp') {
- require_once IMP_BASE . '/lib/Notification/Listener/status-dimp.php';
- $GLOBALS['imp_notify'] = &$notification->attach('status', null, 'Notification_Listener_status_dimp');
+ $GLOBALS['imp_notify'] = &$notification->attach('status', null, 'IMP_Notification_Listener_DimpStatus');
} else {
- require_once IMP_BASE . '/lib/Notification/Listener/status.php';
- require_once 'Horde/Notification/Listener/audio.php';
- $GLOBALS['imp_notify'] = &$notification->attach('status', null, 'Notification_Listener_status_imp');
+ $GLOBALS['imp_notify'] = &$notification->attach('status', null, 'IMP_Notification_Listener_ImpStatus');
$notification->attach('audio');
}
}
// Notification system.
-$notification = &Notification::singleton();
+$notification = &Horde_Notification::singleton();
$notification->attach('status');
// Redirect the user to the Horde login page if they haven't authenticated.
define('JETA_TEMPLATES', $registry->get('templates'));
// Notification system.
-$notification = &Notification::singleton();
+$notification = &Horde_Notification::singleton();
$notification->attach('status');
// Includes.
@define('KASTALIA_TEMPLATES', $registry->get('templates'));
// Notification system.
-$notification = &Notification::singleton();
+$notification = &Horde_Notification::singleton();
$notification->attach('status');
// Define the base file path of Kastalia.
include_once 'Horde/NLS.php';
include_once 'Horde/Auth.php';
include_once 'Horde/Perms.php';
- include_once 'Horde/Notification.php';
include_once 'Horde/Registry.php';
- $notification = Notification::singleton();
+ $notification = &Horde_Notification::singleton();
$notification->attach('status');
$registry = Registry::singleton();
--- /dev/null
+<?php
+/**
+ * The Kronolith_Notification_Listener_Status:: class extends the
+ * Horde_Notification_Listener_Status:: class to return all messages instead
+ * of printing them.
+ *
+ * Copyright 2005-2009 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @todo Move this into Notification core functionality
+ * @author Jan Schneider <jan@horde.org>
+ * @package Horde_Notification
+ */
+class Kronolith_Notification_Listener_Status extends Horde_Notification_Listener_Status
+{
+ /**
+ * The notified message stack.
+ *
+ * @var array
+ */
+ protected $_messageStack = array();
+
+ /**
+ * Returns all status message if there are any on the 'status' message
+ * stack.
+ *
+ * @param array &$messageStack The stack of messages.
+ * @param array $options An array of options.
+ */
+ public function notify(&$messageStack, $options = array())
+ {
+ while ($message = array_shift($messageStack)) {
+ $event = @unserialize($message['event']);
+ $this->_messageStack[] = array('type' => $message['type'],
+ 'flags' => $message['flags'],
+ 'message' => is_object($event)
+ ? $event->getMessage()
+ : null);
+ }
+ }
+
+ /**
+ * Handle every message of type dimp.*; otherwise delegate back to
+ * the parent.
+ *
+ * @param string $type The message type in question.
+ *
+ * @return boolean Whether this listener handles the type.
+ */
+ public function handles($type)
+ {
+ return (substr($type, 0, 10) == 'kronolith.') || parent::handles($type);
+ }
+
+ /**
+ * Returns the message stack.
+ * To return something useful, notify() needs to be called first.
+ *
+ * @param boolean $encode Encode HTML entities?
+ *
+ * @return array List of message hashes.
+ */
+ public function getStack($encode = false)
+ {
+ $msgs = $this->_messageStack;
+ if (!$encode) {
+ return $msgs;
+ }
+
+ for ($i = 0, $mcount = count($msgs); $i < $mcount; ++$i) {
+ if (!in_array('content.raw', $this->getFlags($msgs[$i]))) {
+ $msgs[$i]['message'] = htmlspecialchars($msgs[$i]['message'], ENT_COMPAT, NLS::getCharset());
+ }
+ }
+
+ return $msgs;
+ }
+
+}
+++ /dev/null
-<?php
-
-require_once 'Horde/Notification/Listener/status.php';
-require_once 'Horde/Notification/Event.php';
-
-/**
- * The Notification_Listener_status_kronolith:: class extends the
- * Notification_Listener_status:: class to return all messages instead of
- * printing them.
- *
- * Copyright 2005-2009 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (GPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
- *
- * @todo Move this into Notification core functionality
- * @author Jan Schneider <jan@horde.org>
- * @package Horde_Notification
- */
-class Notification_Listener_status_kronolith extends Notification_Listener_status {
-
- /**
- * The notified message stack.
- *
- * @var array
- */
- var $_messageStack = array();
-
- /**
- * Returns all status message if there are any on the 'status' message
- * stack.
- *
- * @param array &$messageStack The stack of messages.
- * @param array $options An array of options.
- */
- function notify(&$messageStack, $options = array())
- {
- while ($message = array_shift($messageStack)) {
- $event = @unserialize($message['event']);
- $this->_messageStack[] = array('type' => $message['type'],
- 'flags' => $message['flags'],
- 'message' => is_object($event)
- ? $event->getMessage()
- : null);
- }
- }
-
- /**
- * Handle every message of type dimp.*; otherwise delegate back to
- * the parent.
- *
- * @param string $type The message type in question.
- *
- * @return boolean Whether this listener handles the type.
- */
- function handles($type)
- {
- if (substr($type, 0, 10) == 'kronolith.') {
- return true;
- }
- return parent::handles($type);
- }
-
- /**
- * Returns the message stack.
- * To return something useful, notify() needs to be called first.
- *
- * @param boolean $encode Encode HTML entities?
- *
- * @return array List of message hashes.
- */
- function getStack($encode = false)
- {
- $msgs = $this->_messageStack;
- if (!$encode) {
- return $msgs;
- }
-
- for ($i = 0, $mcount = count($msgs); $i < $mcount; ++$i) {
- if (!in_array('content.raw', $this->getFlags($msgs[$i]))) {
- $msgs[$i]['message'] = htmlspecialchars($msgs[$i]['message'], ENT_COMPAT, NLS::getCharset());
- }
- }
-
- return $msgs;
- }
-
-}
define('KRONOLITH_TEMPLATES', $registry->get('templates'));
/* Notification system. */
-$notification = &Notification::singleton();
-require_once KRONOLITH_BASE . '/lib/Notification/Listener/status.php';
-$GLOBALS['kronolith_notify'] = &$notification->attach('status', null, 'Notification_Listener_status_kronolith');
+$notification = &Horde_Notification::singleton();
+$GLOBALS['kronolith_notify'] = &$notification->attach('status', null, 'Kronolith_Notification_Listener_Status');
/* Kronolith base library. */
require_once KRONOLITH_BASE . '/lib/Kronolith.php';
define('NEWS_TEMPLATES', $registry->get('templates'));
// Notification system.
-$notification = &Notification::singleton();
+$notification = &Horde_Notification::singleton();
$notification->attach('status');
// Define the base file path of News.
require_once 'Horde/History.php';
// Notification system.
-$notification = &Notification::singleton();
+$notification = &Horde_Notification::singleton();
$notification->attach('status');
// Define the base file path of Skoli.