Fix combo for multicompany not visible where there is other hooks by
other modules
This commit is contained in:
parent
9cf6c43f8a
commit
7d6d4adcdb
@ -166,7 +166,7 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
|||||||
}
|
}
|
||||||
$conf_css = $themepath."?lang=".$langs->defaultlang;
|
$conf_css = $themepath."?lang=".$langs->defaultlang;
|
||||||
|
|
||||||
// Select templates
|
// Select templates dir
|
||||||
if (! empty($conf->modules_parts['tpl'])) // Using this feature slow down application
|
if (! empty($conf->modules_parts['tpl'])) // Using this feature slow down application
|
||||||
{
|
{
|
||||||
$dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl/'));
|
$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
|
// Should be an array with differents options in $hookmanager->resArray
|
||||||
$parameters=array('entity' => GETPOST('entity','int'));
|
$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.
|
$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
|
||||||
$login = (! empty($hookmanager->resArray['username']) ? $hookmanager->resArray['username'] : (GETPOST("username","alpha") ? GETPOST("username","alpha") : $demologin));
|
$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)
|
// 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('Cache-Control: Public, must-revalidate');
|
||||||
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
||||||
@ -125,8 +123,8 @@ if ($disablenofollow) echo '</a>';
|
|||||||
</span>
|
</span>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<?php
|
<?php
|
||||||
if (! empty($hookmanager->resArray['options'])) {
|
if (! empty($morelogincontent) && is_array($morelogincontent)) {
|
||||||
foreach ($hookmanager->resArray['options'] as $format => $option)
|
foreach ($morelogincontent as $format => $option)
|
||||||
{
|
{
|
||||||
if ($format == 'table') {
|
if ($format == 'table') {
|
||||||
echo '<!-- Option by hook -->';
|
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($conf->global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER; ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (! empty($hookmanager->resArray['options'])) {
|
if (! empty($morelogincontent) && is_array($morelogincontent)) {
|
||||||
foreach ($hookmanager->resArray['options'] as $format => $option)
|
foreach ($morelogincontent as $format => $option)
|
||||||
{
|
{
|
||||||
if ($format == 'js') {
|
if ($format == 'js') {
|
||||||
echo "\n".'<!-- Javascript by hook -->';
|
echo "\n".'<!-- Javascript by hook -->';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user