From aec9a7a60d1899e94400ed24b6efc712506bbee1 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 25 Sep 2022 06:30:09 +0200 Subject: [PATCH] Use isModEnabled --- htdocs/asset/agenda.php | 2 +- htdocs/asset/model/agenda.php | 2 +- htdocs/bom/bom_agenda.php | 2 +- htdocs/bom/bom_card.php | 12 ++++++------ htdocs/comm/card.php | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/asset/agenda.php b/htdocs/asset/agenda.php index 4d1e6d4be56..b40ed122ec6 100644 --- a/htdocs/asset/agenda.php +++ b/htdocs/asset/agenda.php @@ -128,7 +128,7 @@ if ($object->id > 0) { $help_url = 'EN:Module_Agenda_En'; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = assetPrepareHead($object); diff --git a/htdocs/asset/model/agenda.php b/htdocs/asset/model/agenda.php index e0a463ec112..17fb19fe565 100644 --- a/htdocs/asset/model/agenda.php +++ b/htdocs/asset/model/agenda.php @@ -130,7 +130,7 @@ if ($object->id > 0) { $help_url = 'EN:Module_Agenda_En'; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = assetModelPrepareHead($object); diff --git a/htdocs/bom/bom_agenda.php b/htdocs/bom/bom_agenda.php index ac3f672ad33..0c0ede5d30f 100644 --- a/htdocs/bom/bom_agenda.php +++ b/htdocs/bom/bom_agenda.php @@ -130,7 +130,7 @@ if ($object->id > 0) { $help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Agenda'; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = bomPrepareHead($object); diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index 294d57fea9c..af4050f455f 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -353,7 +353,7 @@ if (empty($reshook)) { } $text = $langs->trans('ConfirmValidateBom', $numref); - /*if (! empty($conf->notification->enabled)) + /*if (isModEnabled('notification')) { require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; $notify = new Notify($db); @@ -362,7 +362,7 @@ if (empty($reshook)) { }*/ $formquestion = array(); - if (!empty($conf->bom->enabled)) { + if (isModEnabled('bom')) { $langs->load("mrp"); $forcecombo = 0; if ($conf->browser->name == 'ie') { @@ -381,7 +381,7 @@ if (empty($reshook)) { // Confirmation of closing if ($action == 'close') { $text = $langs->trans('ConfirmCloseBom', $object->ref); - /*if (! empty($conf->notification->enabled)) + /*if (isModEnabled('notification')) { require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; $notify = new Notify($db); @@ -390,7 +390,7 @@ if (empty($reshook)) { }*/ $formquestion = array(); - if (!empty($conf->bom->enabled)) { + if (isModEnabled('bom')) { $langs->load("mrp"); $forcecombo = 0; if ($conf->browser->name == 'ie') { @@ -409,7 +409,7 @@ if (empty($reshook)) { // Confirmation of reopen if ($action == 'reopen') { $text = $langs->trans('ConfirmReopenBom', $object->ref); - /*if (! empty($conf->notification->enabled)) + /*if (isModEnabled('notification')) { require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; $notify = new Notify($db); @@ -418,7 +418,7 @@ if (empty($reshook)) { }*/ $formquestion = array(); - if (!empty($conf->bom->enabled)) { + if (isModEnabled('bom')) { $langs->load("mrp"); require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $forcecombo = 0; diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 3c8db30d7da..f6ae06b1f7f 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -85,7 +85,7 @@ if (isModEnabled('project')) { if (isModEnabled('ficheinter')) { $langs->load("interventions"); } -if (!empty($conf->notification->enabled)) { +if (isModEnabled('notification')) { $langs->load("mails"); }