From bc92ca56ef6c51393d2782b7654eaa162dfc2e10 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Mon, 30 Jul 2012 07:20:56 -0400
Subject: [PATCH] Fixes after default->classic switch
---
program/include/rcube_output.php | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/program/include/rcube_output.php b/program/include/rcube_output.php
index a83ed1f..9aa7c9e 100644
--- a/program/include/rcube_output.php
+++ b/program/include/rcube_output.php
@@ -17,9 +17,6 @@
| Author: Thomas Bruederli <roundcube@gmail.com> |
| Author: Aleksander Machniak <alec@alec.pl> |
+-----------------------------------------------------------------------+
-
- $Id$
-
*/
/**
@@ -227,7 +224,7 @@
header("X-DNS-Prefetch-Control: off");
// We need to set the following headers to make downloads work using IE in HTTPS mode.
- if ($this->browser->ie && rcube_ui::https_check()) {
+ if ($this->browser->ie && rcube_utils::https_check()) {
header('Pragma: private');
header("Cache-Control: private, must-revalidate");
}
@@ -237,6 +234,21 @@
}
}
+ /**
+ * Send header with expire date 30 days in future
+ *
+ * @param int Expiration time in seconds
+ */
+ public function future_expire_header($offset = 2600000)
+ {
+ if (headers_sent())
+ return;
+
+ header("Expires: " . gmdate("D, d M Y H:i:s", time()+$offset) . " GMT");
+ header("Cache-Control: max-age=$offset");
+ header("Pragma: ");
+ }
+
/**
* Show error page and terminate script execution
--
Gitblit v1.9.1