// AdminController refactoring

This commit is contained in:
tDidierjean
2012-02-14 10:47:40 +00:00
parent 34c05b55bc
commit 67a95fd1f6
2 changed files with 11 additions and 6 deletions
+8 -2
View File
@@ -1766,7 +1766,10 @@ class AdminControllerCore extends Controller
if ($this->tabAccess['edit'] === '1')
{
$this->action = 'save';
$this->display = 'edit';
if (Tools::getValue('submitAdd'.$this->table.'AndStay'))
$this->display = 'edit';
else
$this->display = 'list';
}
else
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
@@ -1777,7 +1780,10 @@ class AdminControllerCore extends Controller
if ($this->tabAccess['add'] === '1')
{
$this->action = 'save';
$this->display = 'edit';
if (Tools::getValue('submitAdd'.$this->table.'AndStay'))
$this->display = 'edit';
else
$this->display = 'list';
}
else
$this->errors[] = Tools::displayError('You do not have permission to add here.');