diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 16e3f006d3d..6865e4b8bf4 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2603,7 +2603,7 @@ function top_menu_bookmark() $html = ''; // Define $bookmarks - if (empty($conf->bookmark->enabled) || empty($user->rights->bookmark->lire)) { + if (!isModEnabled('bookmark') || empty($user->rights->bookmark->lire)) { return $html; } @@ -3304,7 +3304,7 @@ if (!function_exists("llxFooter")) { } // Wrapper to add log when clicking on download or preview - if (!empty($conf->blockedlog->enabled) && is_object($object) && !empty($object->id) && $object->id > 0 && $object->statut > 0) { + if (isModEnabled('blockedlog') && is_object($object) && !empty($object->id) && $object->id > 0 && $object->statut > 0) { if (in_array($object->element, array('facture'))) { // Restrict for the moment to element 'facture' print "\n\n"; ?> diff --git a/htdocs/mrp/mo_agenda.php b/htdocs/mrp/mo_agenda.php index d91735c592f..ac944acc066 100644 --- a/htdocs/mrp/mo_agenda.php +++ b/htdocs/mrp/mo_agenda.php @@ -153,7 +153,7 @@ if ($object->id > 0) { // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'.$langs->trans('Project').' '; if ($permissiontoadd) { diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php index e52c0860aa2..373dd7b6410 100644 --- a/htdocs/mrp/mo_card.php +++ b/htdocs/mrp/mo_card.php @@ -436,7 +436,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea }*/ $formquestion = array(); - if (!empty($conf->mrp->enabled)) { + if (isModEnabled('mrp')) { $langs->load("mrp"); require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); @@ -487,7 +487,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $morehtmlref .= $langs->trans('ThirdParty').' '; $morehtmlref .= ': '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'.$langs->trans('Project').' '; if ($permissiontoadd) { diff --git a/htdocs/mrp/mo_document.php b/htdocs/mrp/mo_document.php index e19e0b391a2..4e8808012e1 100644 --- a/htdocs/mrp/mo_document.php +++ b/htdocs/mrp/mo_document.php @@ -131,7 +131,7 @@ if ($object->id) { // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'.$langs->trans('Project').' '; if ($permissiontoadd) { diff --git a/htdocs/mrp/mo_movements.php b/htdocs/mrp/mo_movements.php index 303f5516d72..761a17f016d 100644 --- a/htdocs/mrp/mo_movements.php +++ b/htdocs/mrp/mo_movements.php @@ -327,7 +327,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'.$langs->trans('Project').' '; if ($permissiontoadd) { @@ -605,7 +605,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (!empty($arrayfields['m.datem']['checked'])) { print ''; print ''; - if (empty($conf->productbatch->enabled)) { + if (!isModEnabled('productbatch')) { print ' '; } //else print '
';