summaryrefslogtreecommitdiff
path: root/program/include/rcube_output.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2012-04-24 06:40:56 +0000
committerthomascube <thomas@roundcube.net>2012-04-24 06:40:56 +0000
commit988a80ad673ff77e2d3027098e245be8a15aaf33 (patch)
tree83e43d6996f1874626fe27d433cdbd50126e284d /program/include/rcube_output.php
parent19d5973247d1476a7c566692a412508638ff344d (diff)
Bring back some legacy functions and session vars for better backwards compatibility
Diffstat (limited to 'program/include/rcube_output.php')
-rw-r--r--program/include/rcube_output.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/program/include/rcube_output.php b/program/include/rcube_output.php
index 4a51b5efe..e1d5e43b8 100644
--- a/program/include/rcube_output.php
+++ b/program/include/rcube_output.php
@@ -237,6 +237,21 @@ abstract class rcube_output
}
}
+ /**
+ * 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