diff --git a/htdocs/core/multicompany_page.php b/htdocs/core/multicompany_page.php index c4c9f8c7b0d..456b5ed6e46 100644 --- a/htdocs/core/multicompany_page.php +++ b/htdocs/core/multicompany_page.php @@ -91,24 +91,21 @@ print ''."\n"; print '
'; //print '
'; +// Define $multicompanyList +$multicompanyList = ''; if (!isModEnabled('multicompany')) { $langs->load("admin"); - $bookmarkList .= '
'.$langs->trans("WarningModuleNotActive", $langs->transnoentitiesnoconv("MultiCompany")).''; - $bookmarkList .= '

'; + $multicompanyList .= '
'.$langs->trans("WarningModuleNotActive", $langs->transnoentitiesnoconv("MultiCompany")).''; + $multicompanyList .= '

'; } elseif (!empty($user->entity) && !getDolGlobalInt('MULTICOMPANY_TRANSVERSE_MODE')) { // Should not be accessible if the option to centralize users on the main entity is not activated $langs->load("errors"); - $bookmarkList .= '
'.$langs->trans("ErrorForbidden").''; - $bookmarkList .= '

'; + $multicompanyList .= '
'.$langs->trans("ErrorForbidden").''; + $multicompanyList .= '

'; } else { // Instantiate hooks of thirdparty module $hookmanager->initHooks(array('multicompany')); - // Define $bookmarks - $multicompanyList = ''; - $searchForm = ''; - - if (is_object($mc)) { $listofentities = $mc->getEntitiesList(true, false, true); } @@ -132,9 +129,6 @@ if (!isModEnabled('multicompany')) { } $multicompanyList .= ''; - $searchForm .= ''; - - // Execute hook printBookmarks $parameters = array('multicompany'=>$multicompanyList); $reshook = $hookmanager->executeHooks('printMultiCompanyEntities', $parameters); // Note that $action and $object may have been modified by some hooks @@ -143,19 +137,18 @@ if (!isModEnabled('multicompany')) { } else { $multicompanyList = $hookmanager->resPrint; } - - - print "\n"; - print "\n"; - print '
'; - print ''; - print '
'."\n"; - print $multicompanyList; - print '
'."\n"; - print '
'; - print "\n\n"; } +print "\n"; +print "\n"; +print '
'; +print ''; +print '
'."\n"; +print $multicompanyList; +print '
'."\n"; +print '
'; +print "\n\n"; + print '
'; print ''."\n";