From 87d84ffd490f506ec7799b116e9f47f1975e32f6 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 25 May 2010 17:21:20 -0600 Subject: [PATCH] Use the globally cached version, at least for now --- framework/Auth/lib/Horde/Auth.php | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/framework/Auth/lib/Horde/Auth.php b/framework/Auth/lib/Horde/Auth.php index eececf5fd..43b745598 100644 --- a/framework/Auth/lib/Horde/Auth.php +++ b/framework/Auth/lib/Horde/Auth.php @@ -94,13 +94,6 @@ class Horde_Auth static protected $_instances = array(); /** - * Cached Horde_Browser instance - * - * @var Horde_Browser - */ - static protected $_browser = null; - - /** * The logout reason information. * * @var array @@ -438,7 +431,7 @@ class Horde_Auth } if (!empty($GLOBALS['conf']['auth']['checkbrowser'])) { - if ($_SESSION['horde_auth']['browser'] != self::_getBrowser()->getAgentString()) { + if ($_SESSION['horde_auth']['browser'] != $GLOBALS['injector']->getInstance('Horde_Browser')->getAgentString()) { self::setAuthError(self::REASON_BROWSER); return false; } @@ -742,7 +735,7 @@ class Horde_Auth $_SESSION['horde_auth'] = array( 'app' => $app_array, 'authId' => $authId, - 'browser' => self::_getBrowser()->getAgentString(), + 'browser' => $GLOBALS['injector']->getInstance('Horde_Browser')->getAgentString(), 'change' => !empty($options['change']), 'credentials' => $app, 'driver' => $GLOBALS['conf']['auth']['driver'], @@ -1012,19 +1005,6 @@ class Horde_Auth } /** - * Returns a cached Horde_Brower instance. - * - * @return Horde_Browser A Horde_Browser instance. - */ - static protected function _getBrowser() - { - if (!self::$_browser) { - self::$_browser = new Horde_Browser(); - } - return self::$_browser; - } - - /** * Converts to allowed 64 characters for APRMD5 passwords. * * @param string $value TODO -- 2.11.0