Project

General

Profile

Bug #23994 » rtehtmlarea_bugfix_16314_typo3_4-4.patch

Administrator Admin, 2010-11-10 19:02

View differences:

typo3/sysext/rtehtmlarea/hooks/clearrtecache/class.tx_rtehtmlarea_clearrtecache.php (copie de travail)
class tx_rtehtmlarea_clearrtecache {
function clearTempDir() {
$tempPath = t3lib_div::resolveBackPath(PATH_typo3.'../typo3temp/rtehtmlarea/');
$handle=opendir($tempPath);
while ($data=readdir($handle)) {
if (!is_dir($data) && $data!="." && $data!="..") {
unlink($tempPath.$data);
$handle = @opendir($tempPath);
if ($handle !== FALSE) {
while (($file = readdir($handle)) !== FALSE) {
if ($file != '.' && $file != '..') {
$tempFile = $tempPath . $file;
if (is_file($tempFile)) {
unlink($tempFile);
}
}
}
closedir($handle);
}
closedir($handle);
}
}
(3-3/3)