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/locale.module | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules/locale.module') diff --git a/modules/locale.module b/modules/locale.module index a726fc6c3..8dfccad47 100644 --- a/modules/locale.module +++ b/modules/locale.module @@ -282,7 +282,10 @@ function locale($string) { static $locale_t; if (!isset($locale_t)) { - $locale_t = unserialize(cache_get("locale:$locale")); + $cache = cache_get("locale:$locale"); + if ($cache) { + $locale_t = unserialize($cache->data); + } } if ($locale_t[$string] != "") { -- cgit v1.2.3