Last-Modified by file modification time
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@370 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
4619f78a02
commit
d8a76209bb
|
@ -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("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);
|
$file = str_replace('error_reporting(E_ALL & ~E_NOTICE);', 'error_reporting(E_ALL & ~E_NOTICE);
|
||||||
if (isset($_GET["file"])) {
|
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");
|
header("HTTP/1.1 304 Not Modified");
|
||||||
} else {
|
} 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"]) {
|
switch ($_GET["file"]) {
|
||||||
case "favicon.ico":
|
case "favicon.ico":
|
||||||
header("Content-Type: image/x-icon");
|
header("Content-Type: image/x-icon");
|
||||||
|
|
Loading…
Reference in a new issue