From: moodler Date: Sun, 7 Mar 2004 01:41:55 +0000 (+0000) Subject: Removed troublesome code - don't think it was helping much X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=58abc135546dfc07640288acaffa7ed44ef48b7b;p=moodle.git Removed troublesome code - don't think it was helping much --- diff --git a/lib/weblib.php b/lib/weblib.php index 6026bc4401..9cb5a85749 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -953,19 +953,6 @@ function style_sheet_setup($lastmodified=0, $lifetime=300, $themename="") { global $CFG; - if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) { // May not need to send stylesheet - // Following lines from Wolfram Kriesing and John Dell - $months = array_flip(array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec')); - preg_match('~[^,]*,\s(\d+)\s(\w+)\s(\d+)\s(\d+):(\d+):(\d+).*~', - $_SERVER['HTTP_IF_MODIFIED_SINCE'], $splitDate); - $timestamp = gmmktime($splitDate[4], $splitDate[5], $splitDate[6], $months[$splitDate[2]]+1, - $splitDate[1], $splitDate[3]); - if ($lastmodified <= $timestamp) { - header('HTTP/1.x 304 Not Modified'); - exit; - } - } - header("Last-Modified: " . gmdate("D, d M Y H:i:s", $lastmodified) . " GMT"); header("Expires: " . gmdate("D, d M Y H:i:s", time() + $lifetime) . " GMT"); header("Cache-control: max_age = $lifetime");