Use isModEnabled

This commit is contained in:
Alexandre SPANGARO 2022-09-25 06:32:35 +02:00
parent 93709349d2
commit 3cf2048518
5 changed files with 5 additions and 5 deletions

View File

@ -164,7 +164,7 @@ if ($id > 0) {
$object = new Societe($db); $object = new Societe($db);
$result = $object->fetch($id); $result = $object->fetch($id);
if (!empty($conf->notification->enabled)) { if (isModEnabled('notification')) {
$langs->load("mails"); $langs->load("mails");
} }
$head = societe_prepare_head($object); $head = societe_prepare_head($object);

View File

@ -199,7 +199,7 @@ $object = new Societe($db);
$result = $object->fetch($socid); $result = $object->fetch($socid);
llxHeader("", $langs->trans("ThirdParty").'-'.$langs->trans('PriceByCustomer')); llxHeader("", $langs->trans("ThirdParty").'-'.$langs->trans('PriceByCustomer'));
if (!empty($conf->notification->enabled)) { if (isModEnabled('notification')) {
$langs->load("mails"); $langs->load("mails");
} }
$head = societe_prepare_head($object); $head = societe_prepare_head($object);

View File

@ -84,7 +84,7 @@ if ($socid) {
} }
llxHeader('', $title); llxHeader('', $title);
if (!empty($conf->notification->enabled)) { if (isModEnabled('notification')) {
$langs->load("mails"); $langs->load("mails");
} }
$head = societe_prepare_head($object); $head = societe_prepare_head($object);

View File

@ -1530,7 +1530,7 @@ if ($action == 'create') {
} }
$text = $langs->trans('ConfirmValidateAsk', $numref); $text = $langs->trans('ConfirmValidateAsk', $numref);
if (!empty($conf->notification->enabled)) { if (isModEnabled('notification')) {
require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
$notify = new Notify($db); $notify = new Notify($db);
$text .= '<br>'; $text .= '<br>';

View File

@ -140,7 +140,7 @@ if ($object->id) {
/* /*
* Affichage onglets * Affichage onglets
*/ */
if (!empty($conf->notification->enabled)) { if (isModEnabled('notification')) {
$langs->load("mails"); $langs->load("mails");
} }
$head = user_prepare_head($object); $head = user_prepare_head($object);