From 6663e126688164bee411760fbd78a8ae8b13d2f3 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 14 Apr 2010 03:51:20 +0000 Subject: [PATCH] MINOR force a specific cache subdirectory (from r99009) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102821 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- static-main.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/static-main.php b/static-main.php index bcde77f2e..8d1395763 100644 --- a/static-main.php +++ b/static-main.php @@ -20,7 +20,10 @@ $homepageMapLocation = '../assets/_homepage-map.php'; date_default_timezone_set('Pacific/Auckland'); if ($cacheOn && empty($_COOKIE['bypassStaticCache'])) { - if (file_exists($hostmapLocation)) { + if (isset($_GET['cacheSubdir']) && !preg_match('/[^a-zA-Z0-9\-_]/', $_GET['cacheSubdir'])) { + $cacheDir = $_GET['cacheSubdir']; + } + else if (file_exists($hostmapLocation)) { include_once $hostmapLocation; $subsiteHostmap['default'] = isset($subsiteHostmap['default']) ? $subsiteHostmap['default'] : '';