Use isModEnabled
This commit is contained in:
parent
a44dcdb562
commit
e170da3fda
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user