From d554f3c4c60345a2a45182be9fe1ebfc0a37d55c Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 1 Feb 2010 18:01:23 -0700 Subject: [PATCH] Move browser init to Registry constructor --- framework/Core/lib/Horde/Registry.php | 5 ++++- horde/lib/core.php | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index 3c3f6eec8..80cf31f8c 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -152,7 +152,7 @@ class Horde_Registry $s_ctrl = 0; switch ($args['session_control']) { case 'netscape': - if ($GLOBALS['browser']->isBrowser('mozilla')) { + if (Horde_Browser::singleton()->isBrowser('mozilla')) { session_cache_limiter('private, must-revalidate'); } break; @@ -242,6 +242,9 @@ class Horde_Registry $injector->addBinder('Horde_Template', new Horde_Core_Binder_Template()); $injector->addBinder('Net_DNS_Resolver', new Horde_Core_Binder_Dns()); + /* Initialize browser object. */ + $GLOBALS['browser'] = Horde_Browser::singleton(); + /* Import and global Horde's configuration values. Almost a chicken * and egg issue - since loadConfiguration() uses registry in certain * instances. However, if HORDE_BASE is defined, and app is diff --git a/horde/lib/core.php b/horde/lib/core.php index c6baf3bc8..0bfe93b82 100644 --- a/horde/lib/core.php +++ b/horde/lib/core.php @@ -52,6 +52,3 @@ set_exception_handler(array('Horde', 'fatal')); if (defined('E_DEPRECATED')) { set_error_handler(array('Horde', 'logDeprecated'), E_DEPRECATED); } - -/* Browser detection object. */ -$browser = Horde_Browser::singleton(); -- 2.11.0