thomascube
2011-04-30 638e3459d644c5414ea2ebc39090647c9659340d
Don't attempt to read session data again if the initial read didn't return a result

1 files modified
4 ■■■■ changed files
program/include/rcube_session.php 4 ●●●● patch | view | raw | blame | history
program/include/rcube_session.php
@@ -163,7 +163,7 @@
    $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 @@
    $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);