Fix: use resprint instead resarray
This commit is contained in:
parent
7916a2a648
commit
d800d10766
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2008-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008-2017 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -201,11 +201,16 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
||||
$demopassword=$tab[1];
|
||||
}
|
||||
|
||||
// Execute hook getLoginPageOptions
|
||||
// Should be an array with differents options in $hookmanager->resArray
|
||||
// Execute hook getLoginPageOptions (for table)
|
||||
$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
|
||||
$reshook = $hookmanager->executeHooks('getLoginPageOptions',$parameters); // Note that $action and $object may have been modified by some hooks.
|
||||
//$morelogincontent = $hookmanager->resArray['options']; // TODO Use here a resprints
|
||||
$morelogincontent = $hookmanager->resPrint;
|
||||
|
||||
// Execute hook getLoginPageExtraOptions (eg for js)
|
||||
$parameters=array('entity' => GETPOST('entity','int'));
|
||||
$reshook = $hookmanager->executeHooks('getLoginPageExtraOptions',$parameters); // Note that $action and $object may have been modified by some hooks.
|
||||
$moreloginextracontent = $hookmanager->resPrint;
|
||||
|
||||
// Login
|
||||
$login = (! empty($hookmanager->resArray['username']) ? $hookmanager->resArray['username'] : (GETPOST("username","alpha") ? GETPOST("username","alpha") : $demologin));
|
||||
|
||||
@ -123,7 +123,7 @@ if ($disablenofollow) echo '</a>';
|
||||
</span>
|
||||
</td></tr>
|
||||
<?php
|
||||
if (! empty($morelogincontent) && is_array($morelogincontent)) {
|
||||
/*if (! empty($morelogincontent) && is_array($morelogincontent)) {
|
||||
foreach ($morelogincontent as $format => $option)
|
||||
{
|
||||
if ($format == 'table') {
|
||||
@ -131,6 +131,9 @@ if (! empty($morelogincontent) && is_array($morelogincontent)) {
|
||||
echo $option;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
if (! empty($morelogincontent)) {
|
||||
echo $morelogincontent;
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
@ -287,6 +290,9 @@ if (! empty($morelogincontent) && is_array($morelogincontent)) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (! empty($moreloginextracontent)) {
|
||||
echo $moreloginextracontent;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
Loading…
Reference in New Issue
Block a user