diff --git a/htdocs/includes/menus/barre_top/default.php b/htdocs/includes/menus/barre_top/default.php index cdd4165c315..774cab42780 100644 --- a/htdocs/includes/menus/barre_top/default.php +++ b/htdocs/includes/menus/barre_top/default.php @@ -20,26 +20,56 @@ * */ - - -print ''; -if ($user->comm > 0 && $conf->commercial ) +if (strstr($GLOBALS["SCRIPT_URL"],DOL_URL_ROOT.'/comm/')) { - print 'Commercial'; + print ''; + if ($user->comm > 0 && $conf->commercial ) + { + print 'Commercial'; + } + else + { + print '-'; + } } else { - print '-'; + print ''; + if ($user->comm > 0 && $conf->commercial ) + { + print 'Commercial'; + } + else + { + print '-'; + } } -print ''; -if ($user->compta > 0) + +if (strstr($GLOBALS["SCRIPT_URL"],DOL_URL_ROOT.'/compta/')) { - print 'Compta'; -} + print ''; + if ($user->compta > 0) + { + print 'Compta'; + } + else + { + print '-'; + } +} else { - print '-'; + + print ''; + if ($user->compta > 0) + { + print 'Compta'; + } + else + { + print '-'; + } } print '';