From: Michael M Slusarz Date: Tue, 2 Feb 2010 01:01:23 +0000 (-0700) Subject: Move browser init to Registry constructor X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d554f3c4c60345a2a45182be9fe1ebfc0a37d55c;p=horde.git Move browser init to Registry constructor --- 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();