From c1be869263d94434647831660105616acc22effb Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 11 Feb 2010 12:35:23 -0700 Subject: [PATCH] Use global notification object --- babel/lib/base.php | 4 ---- beatnik/lib/base.php | 4 ---- crumb/lib/base.php | 4 ---- fima/lib/base.php | 4 ---- folks/lib/base.php | 4 ---- framework/Kolab_Storage/test/Horde/Kolab/Storage/Scenario.php | 1 - horde/services/ajax.php | 4 +--- kastalia/lib/base.php | 4 ---- koward/lib/Koward.php | 3 --- news/lib/base.php | 4 ---- skoli/lib/base.php | 4 ---- vilma/lib/base.php | 4 ---- 12 files changed, 1 insertion(+), 43 deletions(-) diff --git a/babel/lib/base.php b/babel/lib/base.php index ace3fff28..ccb657f5f 100644 --- a/babel/lib/base.php +++ b/babel/lib/base.php @@ -22,10 +22,6 @@ if (!defined('BABEL_BASE')) { /* Load the Horde Framework core, and set up inclusion paths. */ require_once HORDE_BASE . '/lib/core.php'; -/* Notification system. */ -$notification = Horde_Notification::singleton(); -$notification->attach('status'); - /* Registry. */ $registry = new Horde_Registry(); diff --git a/beatnik/lib/base.php b/beatnik/lib/base.php index 3c07b9d39..d17e49a2f 100644 --- a/beatnik/lib/base.php +++ b/beatnik/lib/base.php @@ -39,10 +39,6 @@ if (!defined('BEATNIK_BASE')) { define('BEATNIK_BASE', dirname(__FILE__) . '/..'); } -// Notification system. -$notification = Horde_Notification::singleton(); -$notification->attach('status'); - // Beatnik base libraries. require_once BEATNIK_BASE . '/lib/Beatnik.php'; require_once BEATNIK_BASE . '/lib/Driver.php'; diff --git a/crumb/lib/base.php b/crumb/lib/base.php index a88326995..47d185673 100644 --- a/crumb/lib/base.php +++ b/crumb/lib/base.php @@ -29,10 +29,6 @@ try { $conf = &$GLOBALS['conf']; @define('CRUMB_TEMPLATES', $registry->get('templates')); -// Notification system. -$notification = Horde_Notification::singleton(); -$notification->attach('status'); - // Define the base file path of Crumb. @define('CRUMB_BASE', dirname(__FILE__) . '/..'); diff --git a/fima/lib/base.php b/fima/lib/base.php index 68337bd8c..73ab3c530 100644 --- a/fima/lib/base.php +++ b/fima/lib/base.php @@ -38,10 +38,6 @@ if (!defined('FIMA_BASE')) { @define('FIMA_BASE', dirname(__FILE__) . '/..'); } -// Notification system. -$notification = Horde_Notification::singleton(); -$notification->attach('status'); - // Fima base library require_once FIMA_BASE . '/lib/Driver.php'; diff --git a/folks/lib/base.php b/folks/lib/base.php index 6d399cd03..19480b651 100644 --- a/folks/lib/base.php +++ b/folks/lib/base.php @@ -26,10 +26,6 @@ try { $conf = &$GLOBALS['conf']; define('FOLKS_TEMPLATES', $registry->get('templates')); -// Notification system. -$notification = Horde_Notification::singleton(); -$notification->attach('status'); - // Define the base file path of Folks. if (!defined('FOLKS_BASE')) { define('FOLKS_BASE', dirname(__FILE__) . '/..'); diff --git a/framework/Kolab_Storage/test/Horde/Kolab/Storage/Scenario.php b/framework/Kolab_Storage/test/Horde/Kolab/Storage/Scenario.php index 70ee55f1c..267adc152 100644 --- a/framework/Kolab_Storage/test/Horde/Kolab/Storage/Scenario.php +++ b/framework/Kolab_Storage/test/Horde/Kolab/Storage/Scenario.php @@ -318,7 +318,6 @@ EOD; /** Provide the horde registry */ $GLOBALS['registry'] = new Horde_Registry(); - $GLOBALS['notification'] = Horde_Notification::singleton(); $this->prepareFixedConfiguration(); diff --git a/horde/services/ajax.php b/horde/services/ajax.php index c17aba895..5d47f7d9c 100644 --- a/horde/services/ajax.php +++ b/horde/services/ajax.php @@ -38,9 +38,7 @@ try { if (($e->getCode() == Horde_Registry::AUTH_FAILURE) && ($action != 'LogOut')) { $ajax = Horde_Ajax::getInstance($app); - $notification = Horde_Notification::singleton(); - - $notification->push(str_replace('&', '&', Horde_Auth::getLogoutUrl(array('reason' => Horde_Auth::REASON_SESSION))), 'horde.ajaxtimeout', array('content.raw')); + $GLOBALS['notification']->push(str_replace('&', '&', Horde_Auth::getLogoutUrl(array('reason' => Horde_Auth::REASON_SESSION))), 'horde.ajaxtimeout', array('content.raw')); Horde::sendHTTPResponse(Horde::prepareResponse(null, $ajax->notificationHandler()), $ajax->responseType()); exit; } diff --git a/kastalia/lib/base.php b/kastalia/lib/base.php index abdf3870f..1f8b6cb88 100644 --- a/kastalia/lib/base.php +++ b/kastalia/lib/base.php @@ -29,10 +29,6 @@ try { $conf = &$GLOBALS['conf']; @define('KASTALIA_TEMPLATES', $registry->get('templates')); -// Notification system. -$notification = Horde_Notification::singleton(); -$notification->attach('status'); - // Define the base file path of Kastalia. @define('KASTALIA_BASE', dirname(__FILE__) . '/..'); diff --git a/koward/lib/Koward.php b/koward/lib/Koward.php index 16ae8339a..5399d5903 100644 --- a/koward/lib/Koward.php +++ b/koward/lib/Koward.php @@ -52,9 +52,6 @@ class Koward { { global $registry, $notification, $browser; - $notification = Horde_Notification::singleton(); - $notification->attach('status'); - if ($webroot === null) { $webroot = $registry->get('webroot', 'koward'); } diff --git a/news/lib/base.php b/news/lib/base.php index ca74a1d7a..56a9a168a 100644 --- a/news/lib/base.php +++ b/news/lib/base.php @@ -32,10 +32,6 @@ try { $conf = &$GLOBALS['conf']; define('NEWS_TEMPLATES', $registry->get('templates')); -// Notification system. -$notification = Horde_Notification::singleton(); -$notification->attach('status'); - // Define the base file path of News. if (!defined('NEWS_BASE')) { define('NEWS_BASE', dirname(__FILE__) . '/..'); diff --git a/skoli/lib/base.php b/skoli/lib/base.php index 3565af822..54260656f 100644 --- a/skoli/lib/base.php +++ b/skoli/lib/base.php @@ -25,10 +25,6 @@ try { $conf = &$GLOBALS['conf']; @define('SKOLI_TEMPLATES', $registry->get('templates')); -// Notification system. -$notification = Horde_Notification::singleton(); -$notification->attach('status'); - // Define the base file path of Skoli. @define('SKOLI_BASE', dirname(__FILE__) . '/..'); diff --git a/vilma/lib/base.php b/vilma/lib/base.php index 50ee587af..7a8217dfc 100644 --- a/vilma/lib/base.php +++ b/vilma/lib/base.php @@ -42,10 +42,6 @@ require_once VILMA_BASE . '/lib/Driver.php'; /* Templates */ $template = $injector->createInstance('Horde_Template'); -/* Notification system. */ -$notification = &Horde_Notification::singleton(); -$notification->attach('status'); - /* Vilma driver. */ $GLOBALS['vilma_driver'] = &Vilma_Driver::singleton(); -- 2.11.0