diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 9db0f8aed7e..162c1bc086e 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -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);