diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-08-20 09:32:25 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-08-20 09:32:25 +0200 |
commit | ae7027de029e28fdd3894efe919b6171b2b11eab (patch) | |
tree | d2a83feb13621c5122d671dc9827ae3e2b38b0b3 /program/include | |
parent | c8f35a17e645ec7328557846b976e38432c9a062 (diff) |
Added session_path config option and unified cookies settings in javascript
Diffstat (limited to 'program/include')
-rw-r--r-- | program/include/rcube.php | 5 | ||||
-rw-r--r-- | program/include/rcube_output_html.php | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/program/include/rcube.php b/program/include/rcube.php index 84014ef5c..0e40b3c6b 100644 --- a/program/include/rcube.php +++ b/program/include/rcube.php @@ -405,12 +405,17 @@ class rcube $sess_name = $this->config->get('session_name'); $sess_domain = $this->config->get('session_domain'); + $sess_path = $this->config->get('session_path'); $lifetime = $this->config->get('session_lifetime', 0) * 60; // set session domain if ($sess_domain) { ini_set('session.cookie_domain', $sess_domain); } + // set session path + if ($sess_path) { + ini_set('session.cookie_path', $sess_path); + } // set session garbage collecting time according to session_lifetime if ($lifetime) { ini_set('session.gc_maxlifetime', $lifetime * 2); diff --git a/program/include/rcube_output_html.php b/program/include/rcube_output_html.php index 0a8f0e364..a071ee354 100644 --- a/program/include/rcube_output_html.php +++ b/program/include/rcube_output_html.php @@ -67,6 +67,11 @@ class rcube_output_html extends rcube_output $this->set_env('task', $task); $this->set_env('x_frame_options', $this->config->get('x_frame_options', 'sameorigin')); + // add cookie info + $this->set_env('cookie_domain', ini_get('session.cookie_domain')); + $this->set_env('cookie_path', ini_get('session.cookie_path')); + $this->set_env('cookie_secure', ini_get('session.cookie_secure')); + // load the correct skin (in case user-defined) $skin = $this->config->get('skin'); $this->set_skin($skin); |