Fix empty on getDolGlobal

This commit is contained in:
Laurent Destailleur
2023-08-27 15:55:44 +02:00
parent 4ae0e6ed09
commit 4302a6bc04
5 changed files with 20 additions and 10 deletions

View File

@@ -1330,14 +1330,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' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2 && empty(getDolGlobalString($const_name))) {
if ($objMod->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2 && !getDolGlobalString($const_name)) {
$modulequalified = 0;
}
if ($objMod->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1 && empty(getDolGlobalString($const_name))) {
if ($objMod->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1 && !getDolGlobalString($const_name)) {
$modulequalified = 0;
}
//If module is not activated disqualified
if (empty(getDolGlobalString($const_name))) {
// If module is not activated disqualified
if (!getDolGlobalString($const_name)) {
$modulequalified = 0;
}