Use isModEnabled

This commit is contained in:
Alexandre SPANGARO 2022-09-25 06:30:33 +02:00
parent aec9a7a60d
commit fc9e6c541e
5 changed files with 6 additions and 6 deletions

View File

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

View File

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

View File

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

View File

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

View File

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