]> git.joonet.de Git - adminer.git/commitdiff
Last-Modified by file modification time
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Tue, 22 Jan 2008 14:03:28 +0000 (14:03 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Tue, 22 Jan 2008 14:03:28 +0000 (14:03 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@370 7c3ca157-0c34-0410-bff1-cbf682f78f5c

_compile.php

index 88a5278feca0d79a019ed428b1ec21ee6687a4af..2a0242b48f87c2c1ef9882b5f0662386794ab376 100644 (file)
@@ -87,10 +87,11 @@ $file = str_replace("default.css", '<?php echo preg_replace("~\\\\?.*~", "", $_S
 $file = str_replace("arrow.gif", '" . preg_replace("~\\\\?.*~", "", $_SERVER["REQUEST_URI"]) . "?file=arrow.gif', $file);
 $file = str_replace('error_reporting(E_ALL & ~E_NOTICE);', 'error_reporting(E_ALL & ~E_NOTICE);
 if (isset($_GET["file"])) {
-       if ($_SERVER["HTTP_IF_MODIFIED_SINCE"] && ' . time() . ' <= strtotime($_SERVER["HTTP_IF_MODIFIED_SINCE"])) {
+       $last_modified = filemtime(__FILE__);
+       if ($_SERVER["HTTP_IF_MODIFIED_SINCE"] && $last_modified <= strtotime($_SERVER["HTTP_IF_MODIFIED_SINCE"])) {
                header("HTTP/1.1 304 Not Modified");
        } else {
-               header("Last-Modified: " . gmdate("D, d M Y H:i:s", ' . time() . ') . " GMT");
+               header("Last-Modified: " . gmdate("D, d M Y H:i:s", $last_modified) . " GMT");
                switch ($_GET["file"]) {
                        case "favicon.ico":
                                header("Content-Type: image/x-icon");