From 11a40dd1fef6c5b78b054617caba4325f95ee386 Mon Sep 17 00:00:00 2001
From: Cyrill von Wattenwyl <cvw@adfinis.com>
Date: Tue, 02 Sep 2014 05:20:52 -0400
Subject: [PATCH] Merge branch 'master' of https://github.com/roundcube/roundcubemail

---
 program/lib/Roundcube/rcube_session.php |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/program/lib/Roundcube/rcube_session.php b/program/lib/Roundcube/rcube_session.php
index caca262..26f7843 100644
--- a/program/lib/Roundcube/rcube_session.php
+++ b/program/lib/Roundcube/rcube_session.php
@@ -3,7 +3,7 @@
 /*
  +-----------------------------------------------------------------------+
  | This file is part of the Roundcube Webmail client                     |
- | Copyright (C) 2005-2012, The Roundcube Dev Team                       |
+ | Copyright (C) 2005-2014, The Roundcube Dev Team                       |
  | Copyright (C) 2011, Kolab Systems AG                                  |
  |                                                                       |
  | Licensed under the GNU General Public License version 3 or            |
@@ -46,6 +46,13 @@
     private $logging = false;
     private $storage;
     private $memcache;
+
+    /**
+     * Blocks session data from being written to database.
+     * Can be used if write-race conditions are to be expected
+     * @var boolean
+     */
+    public $nowrite = false;
 
 
     /**
@@ -201,6 +208,9 @@
         $table = $this->db->table_name('session');
         $ts    = microtime(true);
 
+        if ($this->nowrite)
+            return true;
+
         // no session row in DB (db_read() returns false)
         if (!$this->key) {
             $oldvars = null;

--
Gitblit v1.9.1