Static files never expires
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@411 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
92eb0d137f
commit
f3a9e46bce
|
@ -86,11 +86,7 @@ $file = preg_replace("~favicon\\.ico|default\\.css|(up|down|plus|minus)\\.gif~",
|
||||||
$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"])) {
|
||||||
$last_modified = filemtime(__FILE__);
|
header("Expires: " . gmdate("D, d M Y H:i:s", filemtime(__FILE__) + 365*24*60*60) . " GMT");
|
||||||
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", $last_modified) . " GMT");
|
|
||||||
if ($_GET["file"] == "favicon.ico") {
|
if ($_GET["file"] == "favicon.ico") {
|
||||||
header("Content-Type: image/x-icon");
|
header("Content-Type: image/x-icon");
|
||||||
echo base64_decode("' . base64_encode(file_get_contents("favicon.ico")) . '");
|
echo base64_decode("' . base64_encode(file_get_contents("favicon.ico")) . '");
|
||||||
|
@ -107,7 +103,6 @@ if (isset($_GET["file"])) {
|
||||||
case "minus.gif": echo base64_decode("' . base64_encode(file_get_contents("minus.gif")) . '"); break;
|
case "minus.gif": echo base64_decode("' . base64_encode(file_get_contents("minus.gif")) . '"); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
exit;
|
exit;
|
||||||
}', $file);
|
}', $file);
|
||||||
$file = php_shrink($file);
|
$file = php_shrink($file);
|
||||||
|
|
|
@ -9,7 +9,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||||
<meta name="robots" content="noindex" />
|
<meta name="robots" content="noindex" />
|
||||||
<title><?php echo $title . (strlen($title2) ? ": " . htmlspecialchars($title2) : "") . " - " . lang('phpMinAdmin') . " 1.6.1"; ?></title>
|
<title><?php echo $title . (strlen($title2) ? ": " . htmlspecialchars($title2) : "") . " - " . lang('phpMinAdmin') . " 1.6.2-dev"; ?></title>
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
|
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
|
||||||
<link rel="stylesheet" type="text/css" href="default.css" /><?php // Ondrej Valka, http://valka.info ?>
|
<link rel="stylesheet" type="text/css" href="default.css" /><?php // Ondrej Valka, http://valka.info ?>
|
||||||
<?php if ($_COOKIE["highlight"] == "jush") { ?>
|
<?php if ($_COOKIE["highlight"] == "jush") { ?>
|
||||||
|
|
Loading…
Reference in a new issue