Use isModEnabled

This commit is contained in:
Alexandre SPANGARO 2022-09-25 06:31:28 +02:00
parent f9b1f89413
commit 75ed50a53c
5 changed files with 6 additions and 6 deletions

View File

@ -138,7 +138,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 = jobPrepareHead($object);

View File

@ -140,7 +140,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 = positionCardPrepareHead($object);

View File

@ -139,7 +139,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 = skillPrepareHead($object);

View File

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

View File

@ -294,7 +294,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Confirmation of action xxxx (You can use it for xxx = 'close', xxx = 'reopen', ...)
if ($action == 'close') {
$text = $langs->trans('ConfirmCloseKM', $object->ref);
/*if (!empty($conf->notification->enabled))
/*if (isModEnabled('notification'))
{
require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
$notify = new Notify($db);
@ -319,7 +319,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Confirmation of action xxxx (You can use it for xxx = 'close', xxx = 'reopen', ...)
if ($action == 'reopen') {
$text = $langs->trans('ConfirmReopenKM', $object->ref);
/*if (!empty($conf->notification->enabled))
/*if (isModEnabled('notification'))
{
require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
$notify = new Notify($db);