From 21d969b2f832ea989e68a699bd2000c817625b5e Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Wed, 11 Jan 2012 16:49:42 +0000 Subject: [PATCH] // Fix subtabs showing in menu when there is not view access --- classes/AdminController.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/classes/AdminController.php b/classes/AdminController.php index 89a20cedc..a1e556a61 100644 --- a/classes/AdminController.php +++ b/classes/AdminController.php @@ -960,8 +960,6 @@ class AdminControllerCore extends Controller } else $this->errors[] = Tools::displayError('You do not have permission to edit here.'); - - // todo : return value ? } @@ -1270,7 +1268,7 @@ class AdminControllerCore extends Controller foreach ($sub_tabs as $index2 => $sub_tab) { // class_name is the name of the class controller - if (Tab::checkTabRights($sub_tab) === true AND (bool)$sub_tab['active']) + if (Tab::checkTabRights($sub_tab['id_tab']) === true AND (bool)$sub_tab['active']) $sub_tabs[$index2]['href'] = $this->context->link->getAdminLink($sub_tab['class_name']); else unset($sub_tabs[$index2]); @@ -2039,7 +2037,7 @@ class AdminControllerCore extends Controller $this->_listTotal = Db::getInstance()->getValue('SELECT FOUND_ROWS() AS `'._DB_PREFIX_.$this->table.'`'); } - public function getlanguages() + public function getLanguages() { $cookie = $this->context->cookie; $this->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;