mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
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:
@@ -186,9 +186,7 @@ if (! empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED))
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Create object $mysoc (A thirdparty object that contains properties of companies managed by Dolibarr.
|
||||
*/
|
||||
// Create object $mysoc (A thirdparty object that contains properties of companies managed by Dolibarr.
|
||||
if (! defined('NOREQUIREDB') && ! defined('NOREQUIRESOC'))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT .'/societe/class/societe.class.php';
|
||||
@@ -207,6 +205,12 @@ if (! defined('NOREQUIRETRAN'))
|
||||
$langs->setDefaultLang((! empty($conf->global->MAIN_LANG_DEFAULT)?$conf->global->MAIN_LANG_DEFAULT:''));
|
||||
}
|
||||
|
||||
|
||||
// Create the global $hookmanager object
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||
$hookmanager=new HookManager($db);
|
||||
|
||||
|
||||
if (! defined('MAIN_LABEL_MENTION_NPR') ) define('MAIN_LABEL_MENTION_NPR','NPR');
|
||||
|
||||
// We force feature to help debug
|
||||
|
||||
Reference in New Issue
Block a user