Use isModEnabled
This commit is contained in:
parent
ab9dda0f93
commit
be55f63b63
@ -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);
|
||||
|
||||
@ -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(
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -110,7 +110,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
/*
|
||||
* Affichage onglets
|
||||
*/
|
||||
if (!empty($conf->notification->enabled)) {
|
||||
if (isModEnabled('notification')) {
|
||||
$langs->load("mails");
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user