mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Removed redundant system temp path discovery in tiny_mce_gzip,
juse use sys_get_temp_dir() instead which is always available.
This commit is contained in:
parent
4a3070757b
commit
e6007c2637
19
thirdparty/tinymce/tiny_mce_gzip.php
vendored
19
thirdparty/tinymce/tiny_mce_gzip.php
vendored
@ -9,29 +9,12 @@
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
// CUSTOM SilverStripe: Copied from Core.php
|
||||
if(!function_exists('getSysTempDir')) {
|
||||
function getSysTempDir() {
|
||||
if(function_exists('sys_get_temp_dir')) {
|
||||
$sysTmp = sys_get_temp_dir();
|
||||
} elseif(isset($_ENV['TMP'])) {
|
||||
$sysTmp = $_ENV['TMP'];
|
||||
} else {
|
||||
$tmpFile = tempnam('adfadsfdas','');
|
||||
unlink($tmpFile);
|
||||
$sysTmp = dirname($tmpFile);
|
||||
}
|
||||
return $sysTmp;
|
||||
}
|
||||
}
|
||||
// CUSTOM END
|
||||
|
||||
// Handle incoming request if it's a script call
|
||||
if (TinyMCE_Compressor::getParam("js")) {
|
||||
// Default settings
|
||||
$tinyMCECompressor = new TinyMCE_Compressor(array(
|
||||
// CUSTOM SilverStripe
|
||||
'cache_dir' => getSysTempDir()
|
||||
'cache_dir' => sys_get_temp_dir()
|
||||
// CUSTOM END
|
||||
));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user