From 3cf2048518357b8ec89c94141b37c314609e5e87 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 25 Sep 2022 06:32:35 +0200 Subject: [PATCH] Use isModEnabled --- htdocs/societe/partnership.php | 2 +- htdocs/societe/price.php | 2 +- htdocs/societe/project.php | 2 +- htdocs/supplier_proposal/card.php | 2 +- htdocs/user/document.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/societe/partnership.php b/htdocs/societe/partnership.php index 4e0552d3c15..b7bcd153092 100644 --- a/htdocs/societe/partnership.php +++ b/htdocs/societe/partnership.php @@ -164,7 +164,7 @@ if ($id > 0) { $object = new Societe($db); $result = $object->fetch($id); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = societe_prepare_head($object); diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index a9f17f4b50a..5ff503c9eec 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -199,7 +199,7 @@ $object = new Societe($db); $result = $object->fetch($socid); llxHeader("", $langs->trans("ThirdParty").'-'.$langs->trans('PriceByCustomer')); -if (!empty($conf->notification->enabled)) { +if (isModEnabled('notification')) { $langs->load("mails"); } $head = societe_prepare_head($object); diff --git a/htdocs/societe/project.php b/htdocs/societe/project.php index f704273db60..5a8ba6a46b2 100644 --- a/htdocs/societe/project.php +++ b/htdocs/societe/project.php @@ -84,7 +84,7 @@ if ($socid) { } llxHeader('', $title); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = societe_prepare_head($object); diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index da70aa005d9..49f0fc408ce 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1530,7 +1530,7 @@ if ($action == 'create') { } $text = $langs->trans('ConfirmValidateAsk', $numref); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; $notify = new Notify($db); $text .= '
'; diff --git a/htdocs/user/document.php b/htdocs/user/document.php index 99191368186..b607cff7f3e 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -140,7 +140,7 @@ if ($object->id) { /* * Affichage onglets */ - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = user_prepare_head($object);