Use isModEnabled
This commit is contained in:
parent
f9b1f89413
commit
75ed50a53c
@ -138,7 +138,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 = jobPrepareHead($object);
|
$head = jobPrepareHead($object);
|
||||||
|
|||||||
@ -140,7 +140,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 = positionCardPrepareHead($object);
|
$head = positionCardPrepareHead($object);
|
||||||
|
|||||||
@ -139,7 +139,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 = skillPrepareHead($object);
|
$head = skillPrepareHead($object);
|
||||||
|
|||||||
@ -130,7 +130,7 @@ if ($object->id > 0) {
|
|||||||
$help_url = '';
|
$help_url = '';
|
||||||
llxHeader('', $title, $help_url);
|
llxHeader('', $title, $help_url);
|
||||||
|
|
||||||
if (!empty($conf->notification->enabled)) {
|
if (isModEnabled('notification')) {
|
||||||
$langs->load("mails");
|
$langs->load("mails");
|
||||||
}
|
}
|
||||||
$head = knowledgerecordPrepareHead($object);
|
$head = knowledgerecordPrepareHead($object);
|
||||||
|
|||||||
@ -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', ...)
|
// Confirmation of action xxxx (You can use it for xxx = 'close', xxx = 'reopen', ...)
|
||||||
if ($action == 'close') {
|
if ($action == 'close') {
|
||||||
$text = $langs->trans('ConfirmCloseKM', $object->ref);
|
$text = $langs->trans('ConfirmCloseKM', $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);
|
||||||
@ -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', ...)
|
// Confirmation of action xxxx (You can use it for xxx = 'close', xxx = 'reopen', ...)
|
||||||
if ($action == 'reopen') {
|
if ($action == 'reopen') {
|
||||||
$text = $langs->trans('ConfirmReopenKM', $object->ref);
|
$text = $langs->trans('ConfirmReopenKM', $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);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user