From 3fec6952ddbff1b5b487ea2927928338f39e4fef Mon Sep 17 00:00:00 2001 From: alecpl Date: Tue, 15 Nov 2011 10:50:30 +0000 Subject: - Applied fixes from trunk up to r5425 --- program/include/rcmail.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'program/include/rcmail.php') diff --git a/program/include/rcmail.php b/program/include/rcmail.php index 969e101f7..e06594fcd 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -678,18 +678,21 @@ class rcmail if (session_id()) return; + $sess_name = $this->config->get('session_name'); + $sess_domain = $this->config->get('session_domain'); + $lifetime = $this->config->get('session_lifetime', 0) * 60; + // set session domain - if ($domain = $this->config->get('session_domain')) { - ini_set('session.cookie_domain', $domain); + if ($sess_domain) { + ini_set('session.cookie_domain', $sess_domain); } // set session garbage collecting time according to session_lifetime - $lifetime = $this->config->get('session_lifetime', 0) * 60; if ($lifetime) { ini_set('session.gc_maxlifetime', $lifetime * 2); } ini_set('session.cookie_secure', rcube_https_check()); - ini_set('session.name', 'roundcube_sessid'); + ini_set('session.name', $sess_name ? $sess_name : 'roundcube_sessid'); ini_set('session.use_cookies', 1); ini_set('session.use_only_cookies', 1); ini_set('session.serialize_handler', 'php'); -- cgit v1.2.3