[*] BO : Add clear smarty cache button

This commit is contained in:
gRoussac
2013-08-13 15:11:00 +02:00
parent b1b636a911
commit e8685b1430
4 changed files with 23 additions and 13 deletions
+1 -13
View File
@@ -368,7 +368,7 @@ class InstallModelInstall extends InstallAbstractModel
public function configureShop(array $data = array())
{
// Clear smarty cache
$this->clearSmartyCache();
Tools::clearSmartyCache();
//clear image cache in tmp folder
Tools::deleteDirectory(_PS_TMP_IMG_DIR_, false);
@@ -494,18 +494,6 @@ class InstallModelInstall extends InstallAbstractModel
return true;
}
/**
* Clear smarty cache folders
*/
public function clearSmartyCache()
{
foreach (array(_PS_CACHE_DIR_.'smarty/cache', _PS_CACHE_DIR_.'smarty/compile') as $dir)
if (file_exists($dir))
foreach (scandir($dir) as $file)
if ($file[0] != '.' && $file != 'index.php')
Tools::deleteDirectory($dir.DIRECTORY_SEPARATOR.$file);
}
public function getModulesList()
{
// @todo REMOVE DEV MODE