From a9587489473baf3854999e711083be212ca0c1c4 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Sun, 07 Jun 2015 09:26:33 -0400 Subject: [PATCH] CS fixes --- program/lib/Roundcube/rcube_session_redis.php | 20 ++++++++------------ 1 files changed, 8 insertions(+), 12 deletions(-) diff --git a/program/lib/Roundcube/rcube_session_redis.php b/program/lib/Roundcube/rcube_session_redis.php index 4822db7..74c06f5 100644 --- a/program/lib/Roundcube/rcube_session_redis.php +++ b/program/lib/Roundcube/rcube_session_redis.php @@ -1,6 +1,6 @@ <?php -/* +/** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | | Copyright (C) 2005-2014, The Roundcube Dev Team | @@ -10,7 +10,7 @@ | See the README file for a full license statement. | | | | PURPOSE: | - | Provide redis supported session management | + | Provide redis supported session management | +-----------------------------------------------------------------------+ | Author: Cor Bosman <cor@roundcu.be> | +-----------------------------------------------------------------------+ @@ -152,7 +152,6 @@ return true; } - /** * read data from redis store * @@ -170,10 +169,7 @@ return !empty($this->vars) ? (string) $this->vars : ''; } - - return null; } - /** * write data to redis store @@ -188,12 +184,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 @@ -204,8 +200,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