MINOR batchactions JS fix

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83594 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Tom Rix 2009-08-03 21:53:30 +00:00
parent efbfb4a5f2
commit a39ec17057

View File

@ -13,8 +13,12 @@
* to no subdirectory.
*/
if (file_exists('../subsites/host-map.php')) {
include_once '../subsites/host-map.php';
$cacheOn = true;
$hostmapLocation = '../subsites/host-map.php';
if ($cacheOn) {
if (file_exists($hostmapLocation)) {
include_once $hostmapLocation;
$subsiteHostmap['default'] = isset($subsiteHostmap['default']) ? $subsiteHostmap['default'] : '';
// Look for the host, and find the cache dir
@ -35,9 +39,12 @@ if (file_exists('../cache/'.$cacheDir.$file.'.html')) {
header('X-cache: hit at '.date('r'));
include_once '../cache/'.$cacheDir.$file.'.php';
} else {
header('X-cache: miss at '.date('r'));
header('X-cache: miss at '.date('r') . ' on ' . $cacheDir . $file);
// No cache hit... fallback!!!
include 'main.php';
}
} else {
include 'main.php';
}
?>