From f8c96f737c1916377e361e3fbaa8a415c4101ca4 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Thu, 07 Jun 2012 04:34:56 -0400
Subject: [PATCH] Enable attachments drag&drop upload for default skin

---
 program/include/rcube_cache.php |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/program/include/rcube_cache.php b/program/include/rcube_cache.php
index 6d7a9ea..01f6203 100644
--- a/program/include/rcube_cache.php
+++ b/program/include/rcube_cache.php
@@ -19,9 +19,6 @@
  | Author: Thomas Bruederli <roundcube@gmail.com>                        |
  | Author: Aleksander Machniak <alec@alec.pl>                            |
  +-----------------------------------------------------------------------+
-
- $Id$
-
 */
 
 
@@ -59,7 +56,7 @@
      * @param string $type   Engine type ('db' or 'memcache' or 'apc')
      * @param int    $userid User identifier
      * @param string $prefix Key name prefix
-     * @param int    $ttl    Expiration time of memcache/apc items in seconds (max.2592000)
+     * @param string $ttl    Expiration time of memcache/apc items
      * @param bool   $packed Enables/disabled data serialization.
      *                       It's possible to disable data serialization if you're sure
      *                       stored data will be always a safe string
@@ -82,8 +79,12 @@
             $this->db   = $rcube->get_dbh();
         }
 
+        // convert ttl string to seconds
+        $ttl = get_offset_sec($ttl);
+        if ($ttl > 2592000) $ttl = 2592000;
+
         $this->userid    = (int) $userid;
-        $this->ttl       = (int) $ttl;
+        $this->ttl       = $ttl;
         $this->packed    = $packed;
         $this->prefix    = $prefix;
     }

--
Gitblit v1.9.1