Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit 6663e126688164bee411760fbd78a8ae8b13d2f3 1 parent 3914952
@chillu chillu authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 static-main.php
View
5 static-main.php
@@ -20,7 +20,10 @@
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'] : '';
Please sign in to comment.
Something went wrong with that request. Please try again.