From ed1d212ae2daea5e4bd043417610177093e99f19 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sat, 16 Jan 2016 03:03:51 -0500
Subject: [PATCH] Improved SVG cleanup code
---
program/lib/Roundcube/rcube_session_redis.php | 20 +++++++++-----------
1 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/program/lib/Roundcube/rcube_session_redis.php b/program/lib/Roundcube/rcube_session_redis.php
index 4822db7..7a72b1f 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
*
@@ -171,9 +170,8 @@
return !empty($this->vars) ? (string) $this->vars : '';
}
- return null;
+ return '';
}
-
/**
* write data to redis store
@@ -188,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
@@ -204,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