diff --git a/modules/pscleaner/pscleaner.php b/modules/pscleaner/pscleaner.php index 35e6f62de..67ea6595c 100644 --- a/modules/pscleaner/pscleaner.php +++ b/modules/pscleaner/pscleaner.php @@ -49,7 +49,19 @@ class PSCleaner extends Module { $html = '

'.$this->l('Be really careful with this tool - There is no possible rollback!').'

'; if (Tools::isSubmit('submitCheckAndFix')) - $html .= $this->displayConfirmation((count($logs = self::checkAndFix()) ? '
'.print_r($logs, true).'
' : $this->l('Nothing that need to be cleaned')).'

'); + { + $logs = self::checkAndFix(); + if (count($logs)) + { + $conf = $this->l('The following queries successfuly fixed broken data:').'
'; + } + else + $conf = $this->l('Nothing that need to be cleaned'); + $html .= $this->displayConfirmation($conf); + } if (Tools::isSubmit('submitTruncateCatalog')) { self::truncate('catalog'); @@ -330,7 +342,7 @@ class PSCleaner extends Module if ($affected_rows = $db->Affected_Rows()) $logs[$query] = $affected_rows; } - + Category::regenerateEntireNtree(); // @Todo: Remove attachment files, images... @@ -522,8 +534,6 @@ class PSCleaner extends Module protected function clearAllCaches() { - $this->_clearCache('blockcategories.tpl'); - $this->_clearCache('blockcategories_footer.tpl'); - $this->_clearCache('blocktopmenu.tpl'); + Context::getContext()->smarty->clearAllCache(); } }