summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-04-13 09:15:39 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-04-13 09:15:39 +0000
commit37a365cb512fe051de0f6240afd8d37e9d634492 (patch)
tree56b0baab72d89a3a4e7569564dcf900a69eefc8a /roundcubemail/program/include
parentaceb6ffeb33acdfe194b322c1a5c078dbaf226b6 (diff)
- reverted r1295
- disable caching for unseen messages to allow marking as read remarked messages git-svn-id: https://svn.roundcube.net/trunk@1296 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
-rw-r--r--roundcubemail/program/include/rcube_shared.inc16
1 files changed, 10 insertions, 6 deletions
diff --git a/roundcubemail/program/include/rcube_shared.inc b/roundcubemail/program/include/rcube_shared.inc
index c9cf4fbbf..f3ff0aa02 100644
--- a/roundcubemail/program/include/rcube_shared.inc
+++ b/roundcubemail/program/include/rcube_shared.inc
@@ -236,18 +236,22 @@ function send_future_expire_header($offset=2600000)
* @param int Modified date as unix timestamp
* @param string Etag value for caching
*/
-function send_modified_header($mdate, $etag=null)
+function send_modified_header($mdate, $etag=null, $skip_check=false)
{
if (headers_sent())
return;
$iscached = false;
- if ($_SERVER['HTTP_IF_MODIFIED_SINCE'] && strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $mdate)
- $iscached = true;
-
$etag = $etag ? "\"$etag\"" : null;
- if ($etag)
- $iscached = ($_SERVER['HTTP_IF_NONE_MATCH'] == $etag);
+
+ if (!$skip_check)
+ {
+ if ($_SERVER['HTTP_IF_MODIFIED_SINCE'] && strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $mdate)
+ $iscached = true;
+
+ if ($etag)
+ $iscached = ($_SERVER['HTTP_IF_NONE_MATCH'] == $etag);
+ }
if ($iscached)
header("HTTP/1.x 304 Not Modified");