alecpl
2012-04-19 6a8b4c2951314441e670d89204dd3b913698b23d
- Fix incorrect cache ttl used in get_cache_engine() (#1488447), use time() where mktime() without arguments was used


4 files modified
10 ■■■■■ changed files
program/include/rcmail.php 2 ●●● patch | view | raw | blame | history
program/include/rcube.php 2 ●●● patch | view | raw | blame | history
program/include/rcube_imap.php 4 ●●● patch | view | raw | blame | history
program/include/rcube_shared.inc 2 ●●● patch | view | raw | blame | history
program/include/rcmail.php
@@ -520,7 +520,7 @@
      $_SESSION['storage_port'] = $port;
      $_SESSION['storage_ssl']  = $ssl;
      $_SESSION['password']     = $this->encrypt($pass);
      $_SESSION['login_time']   = mktime();
      $_SESSION['login_time']   = time();
      if (isset($_REQUEST['_timezone']) && $_REQUEST['_timezone'] != '_default_')
        $_SESSION['timezone'] = floatval($_REQUEST['_timezone']);
program/include/rcube.php
@@ -486,7 +486,7 @@
    public function temp_gc()
    {
        $tmp = unslashify($this->config->get('temp_dir'));
        $expire = mktime() - 172800;  // expire in 48 hours
        $expire = time() - 172800;  // expire in 48 hours
        if ($tmp && ($dir = opendir($tmp))) {
            while (($fname = readdir($dir)) !== false) {
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);
        }
program/include/rcube_shared.inc
@@ -164,7 +164,7 @@
        $unit   = 's';
    }
    $ts = mktime();
    $ts = time();
    switch ($unit) {
    case 'w':
        $amount *= 7;