silverstripe/sapphire — pull request #803 by halkyon (2012-09-19 04:19:10+00:00)
Title: Have tiny_mce_gzip.php use local silverstripe-cache folder if available

This is a fix for ticket #7670 - http://open.silverstripe.org/ticket/7670.

Some hosting situations don't allow write access to the system temp path. tiny_mce_gzip.php is currently using sys_get_temp_dir() by default, and not using a local silverstripe-cache folder that may exist in the SilverStripe project.

This change moves the getTempFolder() function into a common file, and includes that in core/Core.php, as well as thirdparty/tinymce/tiny_mce_gzip.php so both locations share the same code to work out the temp path.

Not sure about the naming of the TempPath.php file, if anyone has any recommendations or alternative approaches, please comment.