summaryrefslogtreecommitdiff
path: root/program/include/rcmail.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-11-08 20:22:34 +0100
committerAleksander Machniak <alec@alec.pl>2012-11-10 12:04:38 +0100
commitc442f822fb9b961f7a92930e572edb52159391d3 (patch)
treeb623ac96927243ee1d78ba751879cbe452ea1925 /program/include/rcmail.php
parentfb53c809a632a0f4122f0ef76cb8958a4ed7f6e1 (diff)
Simplify keep-alive action. Now the interval is based on session_lifetime,
which means it's executed only if needed for session keeping (reset interval on every action). Temporarily remove check-recent request, it will be replaced by new global system refresh request in future. Use keep_alive setting as auto-refresh request interval (allow no-refresh mode)
Diffstat (limited to 'program/include/rcmail.php')
-rw-r--r--program/include/rcmail.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 3728e5d19..a755aa846 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -94,9 +94,6 @@ class rcmail extends rcube
// create user object
$this->set_user(new rcube_user($_SESSION['user_id']));
- // configure session (after user config merge!)
- $this->session_configure();
-
// set task and action properties
$this->set_task(rcube_utils::get_input_value('_task', rcube_utils::INPUT_GPC));
$this->action = asciiwords(rcube_utils::get_input_value('_action', rcube_utils::INPUT_GPC));
@@ -320,10 +317,9 @@ class rcmail extends rcube
if (!($this->output instanceof rcube_output_html))
$this->output = new rcube_output_html($this->task, $framed);
- // set keep-alive/check-recent interval
- if ($this->session && ($keep_alive = $this->session->get_keep_alive())) {
- $this->output->set_env('keep_alive', $keep_alive);
- }
+ // set keep-alive interval
+ $this->output->set_env('keep_alive', $this->config->get('keep_alive', 0));
+ $this->output->set_env('session_lifetime', $this->config->get('session_lifetime', 0) * 60);
if ($framed) {
$this->comm_path .= '&_framed=1';
@@ -522,7 +518,6 @@ class rcmail extends rcube
// Configure environment
$this->set_user($user);
$this->set_storage_prop();
- $this->session_configure();
// fix some old settings according to namespace prefix
$this->fix_namespace_settings($user);