summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-04-30 17:01:59 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-04-30 17:01:59 +0000
commitb7354a69aee4038bef7dcd7939b0f89c15a9911c (patch)
treec0367e918b7b4f04a87798ae92b1e00199c03199 /roundcubemail/program
parent529f35f572049563f314b81c7f9caddb9a416b85 (diff)
Don't attempt to read session data again if the initial read didn't return a result
git-svn-id: https://svn.roundcube.net/trunk@4713 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/include/rcube_session.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/roundcubemail/program/include/rcube_session.php b/roundcubemail/program/include/rcube_session.php
index 9f636b0d2..eca8450af 100644
--- a/roundcubemail/program/include/rcube_session.php
+++ b/roundcubemail/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);