// AdminController refactoring

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13300 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2012-02-14 10:47:40 +00:00
parent 79f75172c8
commit 3311fd7d25
2 changed files with 11 additions and 6 deletions

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.');