From 3a02d6f281905e7ada46b23b75d32ff7afb368f4 Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Thu, 21 Nov 2013 16:11:49 +0100 Subject: [PATCH] [-] BO : Fixed potential errors with untranslated admin tabs #PSCFV-8104 --- classes/Tab.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/Tab.php b/classes/Tab.php index a0bc246aa..50b79c82a 100644 --- a/classes/Tab.php +++ b/classes/Tab.php @@ -237,8 +237,9 @@ class TabCore extends ObjectModel if (!isset(self::$_cache_tabs[$id_lang])) { self::$_cache_tabs[$id_lang] = array(); + // Keep t.*, tl.name instead of only * because if translations are missing, the join on tab_lang will overwrite the id_tab in the results $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' - SELECT * + SELECT t.*, tl.name FROM `'._DB_PREFIX_.'tab` t LEFT JOIN `'._DB_PREFIX_.'tab_lang` tl ON (t.`id_tab` = tl.`id_tab` AND tl.`id_lang` = '.(int)$id_lang.') ORDER BY t.`position` ASC');