2
0
forked from Wavyzz/dolibarr

Easy way to use conf->global

This commit is contained in:
Givriz
2021-04-16 17:10:11 +02:00
parent 0a0804e7d5
commit 86bfcd9510
3 changed files with 9 additions and 9 deletions

View File

@@ -1228,14 +1228,14 @@ function complete_dictionary_with_modules(&$taborder, &$tabname, &$tablib, &$tab
// We discard modules according to features level (PS: if module is activated we always show it)
$const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', get_class($objMod)));
if ($objMod->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2 && empty($conf->global->$const_name)) {
if ($objMod->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2 && empty(getDolGlobalString($const_name))) {
$modulequalified = 0;
}
if ($objMod->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1 && empty($conf->global->$const_name)) {
if ($objMod->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1 && empty(getDolGlobalString($const_name))) {
$modulequalified = 0;
}
//If module is not activated disqualified
if (empty($conf->global->$const_name)) {
if (empty(getDolGlobalString($const_name))) {
$modulequalified = 0;
}