+2010-11-12 Stanislas Rolland <typo3@sjbr.ca>
+
+ * Added feature #16365: htmlArea RTE: Delete compressed files when clearing RTE cache
+
2010-11-11 Steffen Kamper <steffen@typo3.org>
* Fixed bug #16361: Javascript returns 'FALSE' instead of 'false' in class.tslib_content.php (Thanks to Krystian Szymukowicz)
+2010-11-12 Stanislas Rolland <typo3@sjbr.ca>
+
+ * Added feature #16365: htmlArea RTE: Delete compressed files when clearing RTE cache
+
2010-11-11 Stanislas Rolland <typo3@sjbr.ca>
* Fixed bug #16314: Incorrect use of is_dir in class.tx_rtehtmlarea_clearrtecache.php (Thanks to Juergen Deisenroth)
*/
class tx_rtehtmlarea_clearrtecache {
public static function clearTempDir() {
+ // Delete all files in typo3temp/rtehtmlarea
$tempPath = t3lib_div::resolveBackPath(PATH_typo3.'../typo3temp/rtehtmlarea/');
$handle = @opendir($tempPath);
if ($handle !== FALSE) {
}
closedir($handle);
}
+ // Delete all files in typo3temp/compressor with names that start with "htmlarea"
+ $tempPath = t3lib_div::resolveBackPath(PATH_typo3.'../typo3temp/compressor/');
+ $handle = @opendir($tempPath);
+ if ($handle !== FALSE) {
+ while (($file = readdir($handle)) !== FALSE) {
+ if (substr($file, 0, 8) === 'htmlarea') {
+ $tempFile = $tempPath . $file;
+ if (is_file($tempFile)) {
+ unlink($tempFile);
+ }
+ }
+ }
+ closedir($handle);
+ }
+ // Log the action
+ $GLOBALS['BE_USER']->writelog(3, 1, 0, 0, 'htmlArea RTE: User %s has cleared the RTE cache', array($GLOBALS['BE_USER']->user['username']));
}
}
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/hooks/clearrtecache/class.tx_rtehtmlarea_clearrtecache.php']) {