From 782cca3e787ec2420647a458b9410d98f342352d Mon Sep 17 00:00:00 2001 From: mMarinetti Date: Fri, 23 Sep 2011 16:25:15 +0000 Subject: [PATCH] // fix displaying subtab with old system --- admin-dev/header.inc.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/admin-dev/header.inc.php b/admin-dev/header.inc.php index d87b1bef1..6b490d64b 100644 --- a/admin-dev/header.inc.php +++ b/admin-dev/header.inc.php @@ -277,8 +277,9 @@ echo ' if (empty($tab)) echo ''; - -$id_parent_tab_current = (int)(Tab::getCurrentParentId()); +// This is made to display the subtab list +$id_current_tab = (int)(Tab::getIdFromClassName(Dispatcher::$controllers[$tab])); +$myCurrentTab = new Tab($id_current_tab); $tabs = Tab::getTabs(Context::getContext()->language->id, 0); $echoLis = ''; $mainsubtablist = ''; @@ -289,7 +290,7 @@ foreach ($tabs AS $t) $img = (Tools::file_exists_cache(_PS_ADMIN_DIR_.'/themes/'.Context::getContext()->employee->bo_theme.'/img/t/'.$t['class_name'].'.gif') ? 'themes/'.Context::getContext()->employee->bo_theme.'/img/' : _PS_IMG_).'t/'.$t['class_name'].'.gif'; if (trim($t['module']) != '') $img = _MODULE_DIR_.$t['module'].'/'.$t['class_name'].'.gif'; - $current = ((strtolower($t['class_name']) == $tab) OR ($id_parent_tab_current == $t['id_tab'])); + $current = ((strtolower($t['class_name']) == $tab) OR ($myCurrentTab->id_parent == $t['id_tab'])); echo '