forked from Wavyzz/dolibarr
New: hookmanager class is used frequently and is a factory object, so we
can move it during init of environment and use it globally.
This commit is contained in:
@@ -131,11 +131,6 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
||||
global $smartphone,$hookmanager;
|
||||
|
||||
// Instantiate hooks of thirdparty module only if not already define
|
||||
if (! is_object($hookmanager))
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||
$hookmanager=new HookManager($db);
|
||||
}
|
||||
$hookmanager->initHooks(array('mainloginpage'));
|
||||
|
||||
$langcode=(GETPOST('lang')?((is_object($langs)&&$langs->defaultlang)?$langs->defaultlang:'auto'):GETPOST('lang'));
|
||||
|
||||
Reference in New Issue
Block a user