summaryrefslogtreecommitdiff
path: root/program/include/rcube_session.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-04-30 17:01:59 +0000
committerthomascube <thomas@roundcube.net>2011-04-30 17:01:59 +0000
commit638e3459d644c5414ea2ebc39090647c9659340d (patch)
tree5912fa22368b182eb8d6704929e6f83394b860c9 /program/include/rcube_session.php
parent1997a94fbd696e945442172bf18acaa9b47cdcae (diff)
Don't attempt to read session data again if the initial read didn't return a result
Diffstat (limited to 'program/include/rcube_session.php')
-rw-r--r--program/include/rcube_session.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/program/include/rcube_session.php b/program/include/rcube_session.php
index 9f636b0d2..eca8450af 100644
--- a/program/include/rcube_session.php
+++ b/program/include/rcube_session.php
@@ -163,7 +163,7 @@ class rcube_session
$now = $this->db->fromunixtime((int)$ts);
// use internal data from read() for fast requests (up to 0.5 sec.)
- if ($key == $this->key && $ts - $this->start < 0.5) {
+ if ($key == $this->key && (!$this->vars || $ts - $this->start < 0.5)) {
$oldvars = $this->vars;
} else { // else read data again from DB
$oldvars = $this->db_read($key);
@@ -289,7 +289,7 @@ class rcube_session
$ts = microtime(true);
// use internal data for fast requests (up to 0.5 sec.)
- if ($key == $this->key && $ts - $this->start < 0.5)
+ if ($key == $this->key && !($this->vars || $ts - $this->start < 0.5))
$oldvars = $this->vars;
else // else read data again
$oldvars = $this->mc_read($key);