Use isModEnabled

This commit is contained in:
Alexandre SPANGARO 2022-09-25 23:00:12 +02:00
parent a44dcdb562
commit e170da3fda

View File

@ -3550,7 +3550,7 @@ abstract class CommonObject
if (!empty($conf->global->$MODULE)) {
$modsactivated = explode(',', $conf->global->$MODULE);
foreach ($modsactivated as $mod) {
if (!isModEnabled($mod->enabled) {
if (isModEnabled($mod)) {
return 1; // update was disabled by specific setup
}
}
@ -4105,7 +4105,7 @@ abstract class CommonObject
}
// Here $module, $classfile and $classname are set, we can use them.
if ($conf->$module->enabled && (($element != $this->element) || $alsosametype)) {
if (isModEnabled($module) && (($element != $this->element) || $alsosametype)) {
if ($loadalsoobjects && (is_numeric($loadalsoobjects) || ($loadalsoobjects === $objecttype))) {
dol_include_once('/'.$classpath.'/'.$classfile.'.class.php');
//print '/'.$classpath.'/'.$classfile.'.class.php '.class_exists($classname);