From 46f7b7096450939fe03c95aa81ce06ae4bfca89d Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Mon, 28 Mar 2016 06:51:43 -0400 Subject: [PATCH] Enable reply/reply-all/forward buttons also in preview frame of message/rfc822 --- program/lib/Roundcube/rcube_session_redis.php | 21 +++++++++------------ 1 files changed, 9 insertions(+), 12 deletions(-) diff --git a/program/lib/Roundcube/rcube_session_redis.php b/program/lib/Roundcube/rcube_session_redis.php index bc545ca..7a72b1f 100644 --- a/program/lib/Roundcube/rcube_session_redis.php +++ b/program/lib/Roundcube/rcube_session_redis.php @@ -1,17 +1,16 @@ <?php -/* +/** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | | Copyright (C) 2005-2014, The Roundcube Dev Team | - | Copyright (C) 2011, Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | | | | PURPOSE: | - | Provide database supported session management | + | Provide redis supported session management | +-----------------------------------------------------------------------+ | Author: Cor Bosman <cor@roundcu.be> | +-----------------------------------------------------------------------+ @@ -153,7 +152,6 @@ return true; } - /** * read data from redis store * @@ -172,9 +170,8 @@ return !empty($this->vars) ? (string) $this->vars : ''; } - return null; + return ''; } - /** * write data to redis store @@ -189,12 +186,12 @@ $ts = microtime(true); if ($newvars !== $oldvars || $ts - $this->changed > $this->lifetime / 3) { - $this->redis->setex($key, $this->lifetime + 60, serialize(array('changed' => time(), 'ip' => $this->ip, 'vars' => $newvars))); + $data = serialize(array('changed' => time(), 'ip' => $this->ip, 'vars' => $newvars)); + $this->redis->setex($key, $this->lifetime + 60, $data); } return true; } - /** * write data to redis store @@ -205,8 +202,8 @@ */ public function write($key, $vars) { - return $this->redis->setex($key, $this->lifetime + 60, serialize(array('changed' => time(), 'ip' => $this->ip, 'vars' => $vars))); + $data = serialize(array('changed' => time(), 'ip' => $this->ip, 'vars' => $vars)); + + return $this->redis->setex($key, $this->lifetime + 60, $data); } - - -} \ No newline at end of file +} -- Gitblit v1.9.1