From baa65a7af435976506eb2a9a719a995490feea89 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 27 Aug 2022 19:41:47 +0200 Subject: [PATCH] FIX php8 compatibility --- htdocs/admin/modules.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index d04039aefdf..05f7ed441f7 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -786,14 +786,14 @@ if ($mode == 'common' || $mode == 'commonkanban') { if (!empty($objMod->disabled)) { $codeenabledisable .= $langs->trans("Disabled"); - } elseif (!empty($objMod->always_enabled) || ((!empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity != 1))) { + } elseif (!empty($objMod->always_enabled) || ((isModEnabled('multicompany') && $objMod->core_enabled) && ($user->entity || $conf->entity != 1))) { if (method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) { $codeenabledisable .= $langs->trans("Used"); } else { $codeenabledisable .= img_picto($langs->trans("Required"), 'switch_on', '', false, 0, 0, '', 'opacitymedium valignmiddle'); //print $langs->trans("Required"); } - if (!empty($conf->multicompany->enabled) && $user->entity) { + if (isModEnabled('multicompany') && $user->entity) { $disableSetup++; } } else { @@ -1279,7 +1279,7 @@ if ($mode == 'develop') { print ''; print ''.$langs->trans("TryToUseTheModuleBuilder", $langs->transnoentitiesnoconv("ModuleBuilder")).''; print ''; - if (!empty($conf->modulebuilder->enabled)) { + if (isModEnabled('modulebuilder')) { print $langs->trans("SeeTopRightMenu"); } else { print ''.$langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("ModuleBuilder")).'';