diff --git a/classes/AdminController.php b/classes/AdminController.php index 0d7b89874..4085149bb 100644 --- a/classes/AdminController.php +++ b/classes/AdminController.php @@ -2559,8 +2559,11 @@ class AdminControllerCore extends Controller */ public function createTemplate($tpl_name) { - // Overrides exists? - if ($this->override_folder && file_exists($this->context->smarty->getTemplateDir(0).'controllers/'.$this->override_folder.$tpl_name)) + // Use override tpl if it exists + // If view access is denied, we want to use the default template that will be used to display an error + if ($this->viewAccess() + && $this->override_folder + && file_exists($this->context->smarty->getTemplateDir(0).'controllers/'.$this->override_folder.$tpl_name)) return $this->context->smarty->createTemplate('controllers/'.$this->override_folder.$tpl_name, $this->context->smarty); return $this->context->smarty->createTemplate($this->context->smarty->getTemplateDir(0).$tpl_name, $this->context->smarty); diff --git a/controllers/admin/AdminEmployeesController.php b/controllers/admin/AdminEmployeesController.php index 9e4c99bbb..1ff33c208 100644 --- a/controllers/admin/AdminEmployeesController.php +++ b/controllers/admin/AdminEmployeesController.php @@ -368,18 +368,6 @@ class AdminEmployeesControllerCore extends AdminController return parent::postProcess(); } - /*public function initProcess() - { - // If employee is editing its own entry, its ok - if ($this->tabAccess['edit'] !== '1' - && $this->table == 'employee' - && $this->context->employee->id == Tools::getValue('id_employee') - && Tools::isSubmit('updateemployee')) - $this->tabAccess['edit'] = 1; - - parent::initProcess(); - }*/ - public function initContent() { if ($this->context->employee->id == Tools::getValue('id_employee')) diff --git a/controllers/admin/AdminHomeController.php b/controllers/admin/AdminHomeController.php index 39233fb2c..ac3d5d6ed 100644 --- a/controllers/admin/AdminHomeController.php +++ b/controllers/admin/AdminHomeController.php @@ -535,12 +535,10 @@ class AdminHomeControllerCore extends AdminController $this->warnDomainName(); - $tab = get_class(); $protocol = Tools::usingSecureMode()?'https':'http'; $smarty->assign('protocol',$protocol); $isoUser = $this->context->language->iso_code; $smarty->assign('isoUser',$isoUser); - $currency = $this->context->currency; $upgrade = null; $tpl_vars['refresh_check_version'] = 0; if (@ini_get('allow_url_fopen'))