Use isModEnabled
This commit is contained in:
parent
a44dcdb562
commit
e170da3fda
@ -3550,7 +3550,7 @@ abstract class CommonObject
|
|||||||
if (!empty($conf->global->$MODULE)) {
|
if (!empty($conf->global->$MODULE)) {
|
||||||
$modsactivated = explode(',', $conf->global->$MODULE);
|
$modsactivated = explode(',', $conf->global->$MODULE);
|
||||||
foreach ($modsactivated as $mod) {
|
foreach ($modsactivated as $mod) {
|
||||||
if (!isModEnabled($mod->enabled) {
|
if (isModEnabled($mod)) {
|
||||||
return 1; // update was disabled by specific setup
|
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.
|
// 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))) {
|
if ($loadalsoobjects && (is_numeric($loadalsoobjects) || ($loadalsoobjects === $objecttype))) {
|
||||||
dol_include_once('/'.$classpath.'/'.$classfile.'.class.php');
|
dol_include_once('/'.$classpath.'/'.$classfile.'.class.php');
|
||||||
//print '/'.$classpath.'/'.$classfile.'.class.php '.class_exists($classname);
|
//print '/'.$classpath.'/'.$classfile.'.class.php '.class_exists($classname);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user