From ef22a477fce6065434aa520bf778fa54f96c0444 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 17 May 2010 23:51:28 -0600 Subject: [PATCH] Don't use global session_cache_limiter value --- framework/Core/lib/Horde/Registry.php | 9 +++++---- horde/services/cache.php | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index 30c363954..934d15356 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -112,6 +112,9 @@ class Horde_Registry * 'nologintasks' - (boolean) If set, don't perform logintasks (never * performed if authentication is 'none'). * DEFAULT: false + * 'session_cache_limiter' - (string) Use this value for the session cache + * limiter. + * DEFAULT: Uses the value in the configuration. * 'session_control' - (string) Sets special session control limitations: * 'netscape' - TODO; start read/write session * 'none' - Do not start a session @@ -138,6 +141,7 @@ class Horde_Registry 'cli' => null, 'nocompress' => false, 'nologintasks' => false, + 'session_cache_limiter' => null, 'session_control' => null, 'user_admin' => null ), $args); @@ -1528,9 +1532,6 @@ class Horde_Registry /** * Sets a custom session handler up, if there is one. - * If the global variable 'session_cache_limiter' is defined, its value - * will override the cache limiter setting found in the configuration - * file. * * The custom session handler object will be contained in the * $sessionHandler public member variable. @@ -1552,7 +1553,7 @@ class Horde_Registry session_set_cookie_params($conf['session']['timeout'], $conf['cookie']['path'], $conf['cookie']['domain'], $conf['use_ssl'] == 1 ? 1 : 0); - session_cache_limiter(Horde_Util::nonInputVar('session_cache_limiter', $conf['session']['cache_limiter'])); + session_cache_limiter(is_null($this->initParams['session_cache_limiter']) ? $conf['session']['cache_limiter'] : $this->initParams['session_cache_limiter']); session_name(urlencode($conf['session']['name'])); $type = empty($conf['sessionhandler']['type']) diff --git a/horde/services/cache.php b/horde/services/cache.php index b02c2cdab..2412f2222 100644 --- a/horde/services/cache.php +++ b/horde/services/cache.php @@ -40,7 +40,7 @@ if (empty($args['nocache'])) { $session_cache_limiter = 'nocache'; } -Horde_Registry::appInit('horde', array('authentication' => 'none', 'session_control' => 'readonly')); +Horde_Registry::appInit('horde', array('authentication' => 'none', 'session_cache_limiter' => $session_cache_limiter, 'session_control' => 'readonly')); switch ($type) { case 'app': -- 2.11.0