From bfe21a0bc4866e1a97c0bd0bc4dec9fcd107d9b2 Mon Sep 17 00:00:00 2001 From: vChabot Date: Fri, 13 Jan 2012 09:34:56 +0000 Subject: [PATCH] [-] BO : BugFix : #PSTEST-431 : replacing modules names with translated modules names in AdminAccess git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12402 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminAccessController.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/controllers/admin/AdminAccessController.php b/controllers/admin/AdminAccessController.php index 781ee032f..0afd71923 100644 --- a/controllers/admin/AdminAccessController.php +++ b/controllers/admin/AdminAccessController.php @@ -67,6 +67,7 @@ class AdminAccessControllerCore extends AdminController $modules = array(); foreach ($profiles as $profile) + { $modules[$profile['id_profile']] = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT ma.`id_module`, m.`name`, ma.`view`, ma.`configure` FROM '._DB_PREFIX_.'module_access ma @@ -75,6 +76,12 @@ class AdminAccessControllerCore extends AdminController WHERE id_profile = '.(int)$profile['id_profile'].' ORDER BY m.name '); + foreach ($modules[$profile['id_profile']] as &$module) + { + $m = Module::getInstanceById($module['id_module']); + $module['name'] = $m->displayName; + } + } $this->fields_form = array(''); $this->tpl_form_vars = array(