- Fix incorrect cache ttl used in get_cache_engine() (#1488447)
| | |
| | | $_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']); |
| | |
| | | { |
| | | if ($this->caching && !$this->cache) { |
| | | $rcmail = rcmail::get_instance(); |
| | | $ttl = $rcmail->config->get('message_cache_lifetime', '10d') - mktime(); |
| | | $ttl = $rcmail->config->get('message_cache_lifetime', '10d'); |
| | | $ttl = get_offset_time($ttl) - time(); |
| | | $this->cache = $rcmail->get_cache('IMAP', $this->caching, $ttl); |
| | | } |
| | | |
| | |
| | | if (headers_sent()) |
| | | return; |
| | | |
| | | header("Expires: ".gmdate("D, d M Y H:i:s", mktime()+$offset)." GMT"); |
| | | header("Expires: ".gmdate("D, d M Y H:i:s", time()+$offset)." GMT"); |
| | | header("Cache-Control: max-age=$offset"); |
| | | header("Pragma: "); |
| | | } |
| | |
| | | $unit = 's'; |
| | | } |
| | | |
| | | $ts = mktime(); |
| | | $ts = time(); |
| | | switch ($unit) |
| | | { |
| | | case 'w': |