Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MINOR Removed redundant system temp path discovery in tiny_mce_gzip,

juse use sys_get_temp_dir() instead which is always available.
  • Loading branch information...
commit e6007c2637188366fa70becd80f569e343397788 1 parent 4a30707
@halkyon halkyon authored
Showing with 1 addition and 18 deletions.
  1. +1 −18 thirdparty/tinymce/tiny_mce_gzip.php
View
19 thirdparty/tinymce/tiny_mce_gzip.php
@@ -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
));
Please sign in to comment.
Something went wrong with that request. Please try again.