mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
ENHANCEMENT: create cache directory when it does not exist before running the cache build test (from r103708)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@112174 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
62f84637e0
commit
36fe2eab56
@ -46,6 +46,10 @@ class RebuildStaticCacheTask extends Controller {
|
|||||||
$page = singleton('Page');
|
$page = singleton('Page');
|
||||||
$cacheBaseDir = $page->getDestDir();
|
$cacheBaseDir = $page->getDestDir();
|
||||||
|
|
||||||
|
if(!file_exists($cacheBaseDir)) {
|
||||||
|
mkdir($cacheBaseDir);
|
||||||
|
}
|
||||||
|
|
||||||
if (file_exists($cacheBaseDir.'/lock') && !isset($_REQUEST['force'])) die("There already appears to be a publishing queue running. You can skip warning this by adding ?/&force to the URL.");
|
if (file_exists($cacheBaseDir.'/lock') && !isset($_REQUEST['force'])) die("There already appears to be a publishing queue running. You can skip warning this by adding ?/&force to the URL.");
|
||||||
|
|
||||||
touch($cacheBaseDir.'/lock');
|
touch($cacheBaseDir.'/lock');
|
||||||
|
Loading…
Reference in New Issue
Block a user