From: Michael M Slusarz Date: Mon, 11 Oct 2010 03:27:27 +0000 (-0600) Subject: Convert Horde_Notification override to Horde_Session X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=bba91212696c8b0f61dba6209ca0a7053ab7b594;p=horde.git Convert Horde_Notification override to Horde_Session --- diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index 7f1395082..c76b09ae9 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -397,12 +397,12 @@ class Horde_Registry /* Initialize notification object. Always attach status listener by * default. Default status listener can be overriden through the - * $_SESSION['horde_notification']['override'] variable. */ + * 'notification_override' session variable. */ $GLOBALS['notification'] = $injector->getInstance('Horde_Notification'); if (Horde_Util::getFormData('ajaxui') && - isset($_SESSION['horde_notification']['override'])) { - require_once $_SESSION['horde_notification']['override'][0]; - $GLOBALS['notification']->attach('status', null, $_SESSION['horde_notification']['override'][1]); + ($override = $session['horde:notification_override'])) { + require_once $override[0]; + $GLOBALS['notification']->attach('status', null, $override[1]); } else { $GLOBALS['notification']->attach('status'); } diff --git a/imp/lib/Auth.php b/imp/lib/Auth.php index edf01911e..c6dfe4ffa 100644 --- a/imp/lib/Auth.php +++ b/imp/lib/Auth.php @@ -486,8 +486,7 @@ class IMP_Auth /* Indicate that notifications should use AJAX mode. */ if ($session['imp:view'] == 'dimp') { - // TODO - $_SESSION['horde_notification']['override'] = array( + $GLOBALS['session']['horde:notification_override'] = array( IMP_BASE . '/lib/Notification/Listener/AjaxStatus.php', 'IMP_Notification_Listener_AjaxStatus' ); diff --git a/kronolith/index.php b/kronolith/index.php index 45e73c632..7d5cbc40c 100644 --- a/kronolith/index.php +++ b/kronolith/index.php @@ -28,7 +28,7 @@ $today = new Horde_Date($_SERVER['REQUEST_TIME']); /* Suppress menus in prefs screen and indicate that notifications should use * the ajax mode. */ -$_SESSION['horde_notification']['override'] = array( +$session['horde:notification_override'] = array( KRONOLITH_BASE . '/lib/Notification/Listener/AjaxStatus.php', 'Kronolith_Notification_Listener_AjaxStatus' );