2
0
forked from Wavyzz/dolibarr

Use isModEnabled

This commit is contained in:
Alexandre SPANGARO
2022-09-25 22:46:35 +02:00
parent ef94f2af70
commit 70e313f16e
5 changed files with 10 additions and 10 deletions

View File

@@ -3550,7 +3550,7 @@ abstract class CommonObject
if (!empty($conf->global->$MODULE)) {
$modsactivated = explode(',', $conf->global->$MODULE);
foreach ($modsactivated as $mod) {
if ($conf->$mod->enabled) {
if (!isModEnabled($mod->enabled) {
return 1; // update was disabled by specific setup
}
}
@@ -4883,7 +4883,7 @@ abstract class CommonObject
// Define usemargins
$usemargins = 0;
if (!empty($conf->margin->enabled) && !empty($this->element) && in_array($this->element, array('facture', 'facturerec', 'propal', 'commande'))) {
if (isModEnabled('margin') && !empty($this->element) && in_array($this->element, array('facture', 'facturerec', 'propal', 'commande'))) {
$usemargins = 1;
}