// PS Cleaner now clean the img/tmp dir
This commit is contained in:
1 parent
a6da3e94f0
commit
6ae0717e32
1 file changed
+4
@@ -372,6 +372,7 @@ class PSCleaner extends Module
|
|||||||
|
|
||||||
// @Todo: Remove attachment files, images...
|
// @Todo: Remove attachment files, images...
|
||||||
Image::clearTmpDir();
|
Image::clearTmpDir();
|
||||||
|
$this->clearAllCaches();
|
||||||
|
|
||||||
return $logs;
|
return $logs;
|
||||||
}
|
}
|
||||||
@@ -559,6 +560,9 @@ class PSCleaner extends Module
|
|||||||
|
|
||||||
protected function clearAllCaches()
|
protected function clearAllCaches()
|
||||||
{
|
{
|
||||||
|
$index = file_get_contents(_PS_TMP_IMG_DIR_.'index.php');
|
||||||
|
Tools::deleteDirectory(_PS_TMP_IMG_DIR_, false);
|
||||||
|
file_put_contents(_PS_TMP_IMG_DIR_.'index.php', $index);
|
||||||
Context::getContext()->smarty->clearAllCache();
|
Context::getContext()->smarty->clearAllCache();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user