]> git.mjollnir.org Git - moodle.git/commitdiff
Removed troublesome code - don't think it was helping much
authormoodler <moodler>
Sun, 7 Mar 2004 01:41:55 +0000 (01:41 +0000)
committermoodler <moodler>
Sun, 7 Mar 2004 01:41:55 +0000 (01:41 +0000)
lib/weblib.php

index 6026bc4401efab3e6811141cda24d7dde7a88686..9cb5a85749c24a13c707aef797b2582ac59f2325 100644 (file)
@@ -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");