From bba91212696c8b0f61dba6209ca0a7053ab7b594 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Sun, 10 Oct 2010 21:27:27 -0600 Subject: [PATCH] Convert Horde_Notification override to Horde_Session --- framework/Core/lib/Horde/Registry.php | 8 ++++---- imp/lib/Auth.php | 3 +-- kronolith/index.php | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) 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' ); -- 2.11.0