diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php
index 2ae77b03d07..af8fed1c197 100644
--- a/htdocs/admin/delais.php
+++ b/htdocs/admin/delais.php
@@ -172,7 +172,7 @@ if (!isset($conf->global->MAIN_DELAY_ORDERS_TO_PROCESS)) {
if ($action == 'update') {
foreach ($modules as $module => $delays) {
- if (!empty($conf->$module->enabled)) {
+ if (isModEnabled('module')) {
foreach ($delays as $delay) {
if (GETPOST($delay['code']) != '') {
dolibarr_set_const($db, $delay['code'], GETPOST($delay['code']), 'chaine', 0, '', $conf->entity);
@@ -226,13 +226,13 @@ if ($action == 'edit') {
print '
'.$langs->trans("LateWarningAfter").' | ';
foreach ($modules as $module => $delays) {
- if (!empty($conf->$module->enabled)) {
+ if (isModEnabled('module')) {
foreach ($delays as $delay) {
- $value = (!empty($conf->global->{$delay['code']}) ? $conf->global->{$delay['code']}:0);
+ $value = (!empty($conf->global->{$delay['code']}) ? $conf->global->{$delay['code']} : 0);
print '';
- print '| '.img_object('', $delay['img']).' | ';
- print ''.$langs->trans('Delays_'.$delay['code']).' | ';
- print ' '.$langs->trans("days").' |
';
+ print '' . img_object('', $delay['img']) . ' | ';
+ print '' . $langs->trans('Delays_' . $delay['code']) . ' | ';
+ print ' ' . $langs->trans("days") . ' | ';
}
}
}
@@ -260,13 +260,13 @@ if ($action == 'edit') {
print '| '.$langs->trans("DelaysOfToleranceBeforeWarning").' | '.$langs->trans("Value").' |
';
foreach ($modules as $module => $delays) {
- if (!empty($conf->$module->enabled)) {
+ if (isModEnabled('module')) {
foreach ($delays as $delay) {
- $value = (!empty($conf->global->{$delay['code']}) ? $conf->global->{$delay['code']}:0);
+ $value = (!empty($conf->global->{$delay['code']}) ? $conf->global->{$delay['code']} : 0);
print '';
- print '| '.img_object('', $delay['img']).' | ';
- print ''.$langs->trans('Delays_'.$delay['code']).' | ';
- print ''.$value.' '.$langs->trans("days").' |
';
+ print '' . img_object('', $delay['img']) . ' | ';
+ print '' . $langs->trans('Delays_' . $delay['code']) . ' | ';
+ print '' . $value . ' ' . $langs->trans("days") . ' | ';
}
}
}