// Improved display in pscleaner
This commit is contained in:
1 parent
cf7f72fc30
commit
db7f0da746
1 file changed
+14
-4
@@ -49,7 +49,19 @@ class PSCleaner extends Module
|
|||||||
{
|
{
|
||||||
$html = '<h2>'.$this->l('Be really careful with this tool - There is no possible rollback!').'</h2>';
|
$html = '<h2>'.$this->l('Be really careful with this tool - There is no possible rollback!').'</h2>';
|
||||||
if (Tools::isSubmit('submitCheckAndFix'))
|
if (Tools::isSubmit('submitCheckAndFix'))
|
||||||
$html .= $this->displayConfirmation((count($logs = self::checkAndFix()) ? '<pre>'.print_r($logs, true).'</pre>' : $this->l('Nothing that need to be cleaned')).'<br /><br />');
|
{
|
||||||
|
$logs = self::checkAndFix();
|
||||||
|
if (count($logs))
|
||||||
|
{
|
||||||
|
$conf = $this->l('The following queries successfuly fixed broken data:').'<br /><ul>';
|
||||||
|
foreach ($logs as $query => $entries)
|
||||||
|
$conf .= '<li>'.Tools::htmlentitiesUTF8($query).'<br />'.sprintf($this->l('%d line(s)'), $entries).'</li>';
|
||||||
|
$conf .= '</ul>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$conf = $this->l('Nothing that need to be cleaned');
|
||||||
|
$html .= $this->displayConfirmation($conf);
|
||||||
|
}
|
||||||
if (Tools::isSubmit('submitTruncateCatalog'))
|
if (Tools::isSubmit('submitTruncateCatalog'))
|
||||||
{
|
{
|
||||||
self::truncate('catalog');
|
self::truncate('catalog');
|
||||||
@@ -522,8 +534,6 @@ class PSCleaner extends Module
|
|||||||
|
|
||||||
protected function clearAllCaches()
|
protected function clearAllCaches()
|
||||||
{
|
{
|
||||||
$this->_clearCache('blockcategories.tpl');
|
Context::getContext()->smarty->clearAllCache();
|
||||||
$this->_clearCache('blockcategories_footer.tpl');
|
|
||||||
$this->_clearCache('blocktopmenu.tpl');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user