mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
Fix combo for multicompany not visible where there is other hooks by
other modules
This commit is contained in:
@@ -166,7 +166,7 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
||||
}
|
||||
$conf_css = $themepath."?lang=".$langs->defaultlang;
|
||||
|
||||
// Select templates
|
||||
// Select templates dir
|
||||
if (! empty($conf->modules_parts['tpl'])) // Using this feature slow down application
|
||||
{
|
||||
$dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl/'));
|
||||
@@ -205,6 +205,7 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
||||
// Should be an array with differents options in $hookmanager->resArray
|
||||
$parameters=array('entity' => GETPOST('entity','int'));
|
||||
$reshook = $hookmanager->executeHooks('getLoginPageOptions',$parameters); // Note that $action and $object may have been modified by some hooks. resArray is filled by hook.
|
||||
$morelogincontent = $hookmanager->resArray['options']; // TODO Use here a resprints
|
||||
|
||||
// Login
|
||||
$login = (! empty($hookmanager->resArray['username']) ? $hookmanager->resArray['username'] : (GETPOST("username","alpha") ? GETPOST("username","alpha") : $demologin));
|
||||
|
||||
@@ -17,9 +17,7 @@
|
||||
*/
|
||||
|
||||
// Need global variable $title to be defined by caller (like dol_loginfunction)
|
||||
// Caller can also set $theResArray = array(['options']=>array('js'=>..., 'table'=>...);
|
||||
|
||||
|
||||
// Caller can also set $morelogincontent = array(['options']=>array('js'=>..., 'table'=>...);
|
||||
|
||||
header('Cache-Control: Public, must-revalidate');
|
||||
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
||||
@@ -125,8 +123,8 @@ if ($disablenofollow) echo '</a>';
|
||||
</span>
|
||||
</td></tr>
|
||||
<?php
|
||||
if (! empty($hookmanager->resArray['options'])) {
|
||||
foreach ($hookmanager->resArray['options'] as $format => $option)
|
||||
if (! empty($morelogincontent) && is_array($morelogincontent)) {
|
||||
foreach ($morelogincontent as $format => $option)
|
||||
{
|
||||
if ($format == 'table') {
|
||||
echo '<!-- Option by hook -->';
|
||||
@@ -280,8 +278,8 @@ if (!empty($conf->global->MAIN_EASTER_EGG_COMMITSTRIP)) {
|
||||
<?php if (! empty($conf->global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER; ?>
|
||||
|
||||
<?php
|
||||
if (! empty($hookmanager->resArray['options'])) {
|
||||
foreach ($hookmanager->resArray['options'] as $format => $option)
|
||||
if (! empty($morelogincontent) && is_array($morelogincontent)) {
|
||||
foreach ($morelogincontent as $format => $option)
|
||||
{
|
||||
if ($format == 'js') {
|
||||
echo "\n".'<!-- Javascript by hook -->';
|
||||
|
||||
Reference in New Issue
Block a user