Use isModEnabled

This commit is contained in:
Alexandre SPANGARO 2022-09-25 06:32:50 +02:00
parent 3cf2048518
commit 4fd31ff59a
3 changed files with 3 additions and 3 deletions

View File

@ -143,7 +143,7 @@ if ($object->id > 0) {
$help_url = 'EN:Module_Agenda_En'; $help_url = 'EN:Module_Agenda_En';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
if (!empty($conf->notification->enabled)) { if (isModEnabled('notification')) {
$langs->load("mails"); $langs->load("mails");
} }
$head = targetPrepareHead($object); $head = targetPrepareHead($object);

View File

@ -293,7 +293,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Confirmation of action xxxx (You can use it for xxx = 'close', xxx = 'reopen', ...) // Confirmation of action xxxx (You can use it for xxx = 'close', xxx = 'reopen', ...)
if ($action == 'xxx') { if ($action == 'xxx') {
$text = $langs->trans('ConfirmActionTarget', $object->ref); $text = $langs->trans('ConfirmActionTarget', $object->ref);
/*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);

View File

@ -130,7 +130,7 @@ if ($object->id > 0) {
$help_url = 'EN:Module_Workstation'; $help_url = 'EN:Module_Workstation';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
if (!empty($conf->notification->enabled)) { if (isModEnabled('notification')) {
$langs->load("mails"); $langs->load("mails");
} }
$head = workstationPrepareHead($object); $head = workstationPrepareHead($object);