From 6a8b4c2951314441e670d89204dd3b913698b23d Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 19 Apr 2012 02:56:52 -0400
Subject: [PATCH] - Fix incorrect cache ttl used in get_cache_engine() (#1488447), use time() where mktime() without arguments was used
---
program/include/rcube_imap.php | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 2e1e3ed..daba72e 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -3531,7 +3531,9 @@
{
if ($this->caching && !$this->cache) {
$rcube = rcube::get_instance();
- $ttl = $rcube->config->get('message_cache_lifetime', '10d') - mktime();
+ $ttl = $rcube->config->get('message_cache_lifetime', '10d');
+ $ttl = get_offset_time($ttl) - time();
+
$this->cache = $rcube->get_cache('IMAP', $this->caching, $ttl);
}
--
Gitblit v1.9.1