// AdminControllers fixes
This commit is contained in:
@@ -85,18 +85,27 @@ class AdminPaymentControllerCore extends AdminController
|
||||
}
|
||||
|
||||
public function postProcess()
|
||||
{
|
||||
if ($this->action)
|
||||
$this->saveRestrictions($this->action);
|
||||
}
|
||||
|
||||
public function initProcess()
|
||||
{
|
||||
if ($this->tabAccess['edit'] === '1')
|
||||
{
|
||||
if (Tools::isSubmit('submitModulecountry'))
|
||||
$this->saveRestrictions('country');
|
||||
$this->action = 'country';
|
||||
else if (Tools::isSubmit('submitModulecurrency'))
|
||||
$this->saveRestrictions('currency');
|
||||
$this->action ='currency';
|
||||
else if (Tools::isSubmit('submitModulegroup'))
|
||||
$this->saveRestrictions('group');
|
||||
$this->action ='group';
|
||||
}
|
||||
else
|
||||
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
}
|
||||
|
||||
|
||||
private function saveRestrictions($type)
|
||||
{
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'module_'.bqSQL($type).'` WHERE id_shop = '.Context::getContext()->shop->getID(true));
|
||||
|
||||
Reference in New Issue
Block a user