Fix create temp folder if it does not exist

This commit is contained in:
Christopher Joe 2017-06-06 09:58:51 +12:00
parent 4b9d5dceb8
commit 5f5bfa5e70
1 changed files with 6 additions and 2 deletions

View File

@ -16,10 +16,14 @@ require_once $frameworkPath . '/core/Constants.php';
// Handle incoming request if it's a script call
if (TinyMCE_Compressor::getParam("js")) {
// Default settings
$tempFolder = TEMP_FOLDER . '/tinymce-cache';
if (!file_exists($tempFolder)) {
mkdir($tempFolder);
}
// Default settings
$tinyMCECompressor = new TinyMCE_Compressor(array(
// CUSTOM SilverStripe
'cache_dir' => TEMP_FOLDER.'/tinymce-cache'
'cache_dir' => $tempFolder
// CUSTOM END
));