diff --git a/htdocs/lib/security.lib.php b/htdocs/lib/security.lib.php index dafa35fa050..31014563833 100644 --- a/htdocs/lib/security.lib.php +++ b/htdocs/lib/security.lib.php @@ -213,7 +213,7 @@ function dol_loginfunction($langs,$conf,$mysoc) { $mc = new ActionsMulticompany($db); - $select_entity=$mc->select_entities($lastentity, 1, 'tabindex="3"'); + $select_entity=$mc->select_entities($lastentity, 'tabindex="3"'); } } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index d2403e4efde..ae9f613ccdc 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1186,12 +1186,13 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a if ($res) { - //$mc = new ActionsMulticompany($db); + $mc = new ActionsMulticompany($db); + $mc->getInfo($conf->entity); $entitytext = img_object('', 'globe',"class='entity'"); - $entityhtmltext = 'EntityName'; + $entityhtmltext = $mc->label; print $html->textwithtooltip('',$entityhtmltext,2,1,$entitytext,'',1); //$select_entity = '
'.$mc->select_entities($conf->entity).'
'; - //if ($mc->numEntity >= 1) print $select_entity; + //print $select_entity; } } } diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index 4560722e46c..ac6ed3edefa 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -234,7 +234,7 @@ if (! empty($conf->global->MAIN_MODULE_MULTICOMPANY) && ! $disabled) if ($res) { $mc = new ActionsMulticompany($db); - $select_entity = $mc->select_entities($lastentity,0,'tabindex="2"'); + $select_entity = $mc->select_entities($lastentity,'tabindex="2"'); } }