summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-11-13 10:00:46 +0000
committeralecpl <alec@alec.pl>2011-11-13 10:00:46 +0000
commitbd34cad1f6a5e3adb9bfb99947c7d3865a216142 (patch)
treecaaad82d467bf849943eee2c6b5377a9ee73d896 /program
parent95ebcd91f2de6fcce31dc5d3082467185e46508d (diff)
- Add option to set session name (#1486433)
Diffstat (limited to 'program')
-rw-r--r--program/include/rcmail.php11
1 files changed, 7 insertions, 4 deletions
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');