diff --git a/htdocs/includes/menus/barre_top/default.php b/htdocs/includes/menus/barre_top/default.php index 912f97fe37e..a372930e2b5 100644 --- a/htdocs/includes/menus/barre_top/default.php +++ b/htdocs/includes/menus/barre_top/default.php @@ -79,13 +79,18 @@ class MenuTop { // Entrée home $id=""; + if ($_GET["mainmenu"] == "home" || ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "home")) { $id="sel"; } - if (! ereg("^".DOL_URL_ROOT."\/(adherents|comm|compta|product|fourn|projet)\/",$_SERVER["PHP_SELF"])) { + + if (! ereg("^".DOL_URL_ROOT."\/(adherents|comm|commande|compta|contrat|product|fourn|projet)\/",$_SERVER["PHP_SELF"])) { $id="sel"; } + else { + $id=""; + } print 'atarget?" target=$this->atarget":"").'>'.$langs->trans("Home").''; // Entrée adherent @@ -120,7 +125,7 @@ class MenuTop { { $class='class="tmenu" id="sel"'; } - elseif (ereg("^".DOL_URL_ROOT."\/comm\/",$_SERVER["PHP_SELF"])) + elseif (ereg("^".DOL_URL_ROOT."\/(comm|commande|contrat)\/",$_SERVER["PHP_SELF"])) { $class='class="tmenu" id="sel"'; }