Move browser init to Registry constructor
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 2 Feb 2010 01:01:23 +0000 (18:01 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 2 Feb 2010 01:04:58 +0000 (18:04 -0700)
framework/Core/lib/Horde/Registry.php
horde/lib/core.php

index 3c3f6ee..80cf31f 100644 (file)
@@ -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
index c6baf3b..0bfe93b 100644 (file)
@@ -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();