Convert Horde_Notification override to Horde_Session
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 11 Oct 2010 03:27:27 +0000 (21:27 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 12 Oct 2010 20:31:23 +0000 (14:31 -0600)
framework/Core/lib/Horde/Registry.php
imp/lib/Auth.php
kronolith/index.php

index 7f13950..c76b09a 100644 (file)
@@ -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');
         }
index edf0191..c6dfe4f 100644 (file)
@@ -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'
             );
index 45e73c6..7d5cbc4 100644 (file)
@@ -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'
 );