From b6b24c28e046bbd0bddb9b2b65ca9d4bddff24c8 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 11 Dec 2002 22:00:04 +0000 Subject: Applied patch by Natrak: - page_header() now adds Last-Modified and ETag http headers. - When running PHP as an Apache module page_header() will check the HTTP headers for conditional gets, and will only push the content when it fails. (Works for html and xml pages as they are all cached). Note: this is a PHP limitation, so until PHP makes it work for other web servers this won't work for them. - Added created field to cache database to hold the timestamp when the cache was created. - Changed cache_get() to return an object with ->data and ->created. - Update forum and locale modules. --- modules/forum/forum.module | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/forum') diff --git a/modules/forum/forum.module b/modules/forum/forum.module index cfe9dc4cd..7825f7eeb 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -104,7 +104,7 @@ function forum_block($op = "list", $delta = 0) { } $blocks["subject"] = t("Forum topics"); - $blocks["content"] = $content; + $blocks["content"] = $content->data; } } @@ -310,7 +310,7 @@ function forum_get_forums($tid = 0) { $tid = 0; } - $forums = unserialize(cache_get("forum:$tid")); + $forums = cache_get("forum:$tid"); if (!$forums) { $forums = array(); @@ -333,6 +333,7 @@ function forum_get_forums($tid = 0) { } if ($user->uid && $forums) { + $forums = unserialize($forums); foreach (_forum_topics_read($user->uid) as $tid => $old) { if ($forums[$tid]) { $forums[$tid]->old_topics = $old; -- cgit v1.2.3