diff --git a/controllers/admin/AdminAccessController.php b/controllers/admin/AdminAccessController.php index dd27d63d3..8ec7d2e14 100644 --- a/controllers/admin/AdminAccessController.php +++ b/controllers/admin/AdminAccessController.php @@ -35,9 +35,10 @@ class AdminAccessControllerCore extends AdminController public function __construct() { - $this->table = 'access'; + $this->table = 'access'; $this->className = 'Profile'; - $this->lang = false; + $this->multishop_context = Shop::CONTEXT_ALL; + $this->lang = false; $this->context = Context::getContext(); // Blacklist AdminLogin @@ -235,6 +236,6 @@ class AdminAccessControllerCore extends AdminController */ public function getCurrentProfileId() { - return (isset($_GET['id_profile']) && !empty($_GET['id_profile']) && is_numeric($_GET['id_profile'])) ? (int)$_GET['id_profile'] : 1; + return (isset($_GET['id_profile']) && !empty($_GET['id_profile']) && is_numeric($_GET['id_profile'])) ? (int)$_GET['id_profile'] : 1; } } diff --git a/controllers/admin/AdminProfilesController.php b/controllers/admin/AdminProfilesController.php index d41055feb..552541318 100644 --- a/controllers/admin/AdminProfilesController.php +++ b/controllers/admin/AdminProfilesController.php @@ -30,14 +30,15 @@ class AdminProfilesControllerCore extends AdminController public function __construct() { $this->context = Context::getContext(); - $this->table = 'profile'; - $this->className = 'Profile'; - $this->lang = true; + $this->table = 'profile'; + $this->className = 'Profile'; + $this->multishop_context = Shop::CONTEXT_ALL; + $this->lang = true; $this->addRowAction('edit'); $this->addRowAction('delete'); $this->addRowActionSkipList('delete', array(1)); - $this->bulk_actions = array( + $this->bulk_actions = array( 'delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')) ); @@ -83,7 +84,7 @@ class AdminProfilesControllerCore extends AdminController public function postProcess() { - /* PrestaShop demo mode */ + /* PrestaShop demo mode */ if (_PS_MODE_DEMO_) { $this->errors[] = Tools::displayError('This functionality has been disabled.'); @@ -91,7 +92,7 @@ class AdminProfilesControllerCore extends AdminController } /* PrestaShop demo mode*/ - if (isset($_GET['delete'.$this->table]) && $_GET[$this->identifier] == (int)(_PS_ADMIN_PROFILE_)) + if (isset($_GET['delete'.$this->table]) && $_GET[$this->identifier] == (int)(_PS_ADMIN_PROFILE_)) $this->errors[] = $this->l('For security reasons, you cannot delete the Administrator profile'); else parent::postProcess();