Use isModEnabled

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

View File

@ -128,7 +128,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 = assetPrepareHead($object); $head = assetPrepareHead($object);

View File

@ -130,7 +130,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 = assetModelPrepareHead($object); $head = assetModelPrepareHead($object);

View File

@ -130,7 +130,7 @@ if ($object->id > 0) {
$help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Agenda'; $help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Agenda';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
if (!empty($conf->notification->enabled)) { if (isModEnabled('notification')) {
$langs->load("mails"); $langs->load("mails");
} }
$head = bomPrepareHead($object); $head = bomPrepareHead($object);

View File

@ -353,7 +353,7 @@ if (empty($reshook)) {
} }
$text = $langs->trans('ConfirmValidateBom', $numref); $text = $langs->trans('ConfirmValidateBom', $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);
@ -362,7 +362,7 @@ if (empty($reshook)) {
}*/ }*/
$formquestion = array(); $formquestion = array();
if (!empty($conf->bom->enabled)) { if (isModEnabled('bom')) {
$langs->load("mrp"); $langs->load("mrp");
$forcecombo = 0; $forcecombo = 0;
if ($conf->browser->name == 'ie') { if ($conf->browser->name == 'ie') {
@ -381,7 +381,7 @@ if (empty($reshook)) {
// Confirmation of closing // Confirmation of closing
if ($action == 'close') { if ($action == 'close') {
$text = $langs->trans('ConfirmCloseBom', $object->ref); $text = $langs->trans('ConfirmCloseBom', $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);
@ -390,7 +390,7 @@ if (empty($reshook)) {
}*/ }*/
$formquestion = array(); $formquestion = array();
if (!empty($conf->bom->enabled)) { if (isModEnabled('bom')) {
$langs->load("mrp"); $langs->load("mrp");
$forcecombo = 0; $forcecombo = 0;
if ($conf->browser->name == 'ie') { if ($conf->browser->name == 'ie') {
@ -409,7 +409,7 @@ if (empty($reshook)) {
// Confirmation of reopen // Confirmation of reopen
if ($action == 'reopen') { if ($action == 'reopen') {
$text = $langs->trans('ConfirmReopenBom', $object->ref); $text = $langs->trans('ConfirmReopenBom', $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);
@ -418,7 +418,7 @@ if (empty($reshook)) {
}*/ }*/
$formquestion = array(); $formquestion = array();
if (!empty($conf->bom->enabled)) { if (isModEnabled('bom')) {
$langs->load("mrp"); $langs->load("mrp");
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
$forcecombo = 0; $forcecombo = 0;

View File

@ -85,7 +85,7 @@ if (isModEnabled('project')) {
if (isModEnabled('ficheinter')) { if (isModEnabled('ficheinter')) {
$langs->load("interventions"); $langs->load("interventions");
} }
if (!empty($conf->notification->enabled)) { if (isModEnabled('notification')) {
$langs->load("mails"); $langs->load("mails");
} }