Use isModEnabled

This commit is contained in:
Alexandre SPANGARO 2022-09-25 06:31:56 +02:00
parent ab9dda0f93
commit be55f63b63
5 changed files with 7 additions and 7 deletions

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 = partnershipPrepareHead($object);

View File

@ -370,7 +370,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
array('type' => 'text', 'name' => 'reason_decline_or_cancel', 'label' => $langs->trans("Note"), 'morecss' => 'reason_decline_or_cancel minwidth400', 'value' => '') // Field to complete private note (not replace)
);
// 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(

View File

@ -144,7 +144,7 @@ if ($id > 0 || $ref) {
}
llxHeader('', $title, $help_url);
if (!empty($conf->notification->enabled)) {
if (isModEnabled('notification')) {
$langs->load("mails");
}
$type = $langs->trans('Product');

View File

@ -71,7 +71,7 @@ if (isModEnabled('accounting')) {
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
}
if (!empty($conf->bom->enabled)) {
if (isModEnabled('bom')) {
require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
}
@ -2074,7 +2074,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}
}
if (!$object->isService() && !empty($conf->bom->enabled)) {
if (!$object->isService() && isModEnabled('bom')) {
print '<tr><td>'.$form->textwithpicto($langs->trans("DefaultBOM"), $langs->trans("DefaultBOMDesc", $langs->transnoentitiesnoconv("Finished"))).'</td><td>';
$bomkey = "Bom:bom/class/bom.class.php:0:t.status=1 AND t.fk_product=".((int) $object->id);
print $form->selectForForms($bomkey, 'fk_default_bom', $object->fk_default_bom, 1);
@ -2584,7 +2584,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}
}
if (!$object->isService() && !empty($conf->bom->enabled) && $object->finished) {
if (!$object->isService() && isModEnabled('bom') && $object->finished) {
print '<tr><td class="titlefield">'.$form->textwithpicto($langs->trans("DefaultBOM"), $langs->trans("DefaultBOMDesc", $langs->transnoentitiesnoconv("Finished"))).'</td><td>';
if ($object->fk_default_bom) {
$bom_static = new BOM($db);

View File

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