summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-04-23 12:25:44 +0000
committeralecpl <alec@alec.pl>2010-04-23 12:25:44 +0000
commitbf67d60e435a6f01b835a0d5afb9737f81560433 (patch)
tree0dfe6b3e83cf272b17c36a05353d65d64b9aa3d8
parenta03c98092f7bdb98347876a1a1a4716dfe46be89 (diff)
- Skip session initialization/configuration if session is initialized already (e.g. using Installer)
-rw-r--r--program/include/rcmail.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index c9a06584a..1934535bf 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -350,7 +350,7 @@ class rcmail
$this->output = new rcube_template($this->task, $framed);
// set keep-alive/check-recent interval
- if ($keep_alive = $this->session->get_keep_alive()) {
+ if ($this->session && ($keep_alive = $this->session->get_keep_alive())) {
$this->output->set_env('keep_alive', $keep_alive);
}
@@ -481,6 +481,10 @@ class rcmail
*/
public function session_init()
{
+ // session started (Installer?)
+ if (session_id())
+ return;
+
$lifetime = $this->config->get('session_lifetime', 0) * 60;
// set session domain
@@ -522,6 +526,9 @@ class rcmail
*/
public function session_configure()
{
+ if (!$this->session)
+ return;
+
$lifetime = $this->config->get('session_lifetime', 0) * 60;
// set keep-alive/check-recent interval
@@ -980,7 +987,10 @@ class rcmail
$mem .= '/'.show_bytes(memory_get_peak_usage());
$log = $this->task . ($this->action ? '/'.$this->action : '') . ($mem ? " [$mem]" : '');
- rcube_print_time(RCMAIL_START, $log);
+ if (defined('RCMAIL_START'))
+ rcube_print_time(RCMAIL_START, $log);
+ else
+ console($log);
}
}