diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php
index 0da79845d14..75f2badfda5 100644
--- a/htdocs/admin/supplier_order.php
+++ b/htdocs/admin/supplier_order.php
@@ -464,8 +464,7 @@ print "\n";
// Ask for payment bank during supplier order
/* Kept as hidden for the moment
-if ($conf->banque->enabled)
-{
+if (isModEnabled('banque')) {
print '
';
$tmptitle = $langs->trans('IncludingProductWithTag');
diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php
index fb4461f94e3..2cf87aaf550 100644
--- a/htdocs/core/actions_addupdatedelete.inc.php
+++ b/htdocs/core/actions_addupdatedelete.inc.php
@@ -132,7 +132,7 @@ if ($action == 'add' && !empty($permissiontoadd)) {
$result = $object->create($user);
if ($result > 0) {
// Creation OK
- if ($conf->categorie->enabled && method_exists($object, 'setCategories')) {
+ if (isModEnabled('categorie') && method_exists($object, 'setCategories')) {
$categories = GETPOST('categories', 'array:int');
$object->setCategories($categories);
}
@@ -239,7 +239,7 @@ if ($action == 'update' && !empty($permissiontoadd)) {
}
}
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
$categories = GETPOST('categories', 'array');
if (method_exists($object, 'setCategories')) {
$object->setCategories($categories);
diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php
index 31a48f38cf4..957026c2180 100644
--- a/htdocs/core/class/html.formticket.class.php
+++ b/htdocs/core/class/html.formticket.class.php
@@ -433,7 +433,7 @@ class FormTicket
}
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_TICKET, '', 'parent', 64, 0, 1);
diff --git a/htdocs/core/lib/order.lib.php b/htdocs/core/lib/order.lib.php
index 0109847c59a..8860f4126c4 100644
--- a/htdocs/core/lib/order.lib.php
+++ b/htdocs/core/lib/order.lib.php
@@ -60,7 +60,7 @@ function commande_prepare_head(Commande $object)
$h++;
}
- if (($conf->expedition_bon->enabled && $user->rights->expedition->lire)
+ if ((isModEnabled('expedition_bon') && $user->rights->expedition->lire)
|| ($conf->delivery_note->enabled && $user->rights->expedition->delivery->lire)) {
$nbShipments = $object->getNbOfShipments();
$nbReceiption = 0;
diff --git a/htdocs/eventorganization/conferenceorbooth_card.php b/htdocs/eventorganization/conferenceorbooth_card.php
index 0d14811ef67..0d5991bb0ac 100644
--- a/htdocs/eventorganization/conferenceorbooth_card.php
+++ b/htdocs/eventorganization/conferenceorbooth_card.php
@@ -299,7 +299,7 @@ if (!empty($withproject)) {
print '';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
print $form->showCategories($projectstatic->id, Categorie::TYPE_PROJECT, 1);
print " |
";
diff --git a/htdocs/eventorganization/conferenceorbooth_contact.php b/htdocs/eventorganization/conferenceorbooth_contact.php
index 67cb2c659ee..da6c0f8ee04 100644
--- a/htdocs/eventorganization/conferenceorbooth_contact.php
+++ b/htdocs/eventorganization/conferenceorbooth_contact.php
@@ -282,7 +282,7 @@ if (!empty($withproject)) {
print '';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
print $form->showCategories($projectstatic->id, Categorie::TYPE_PROJECT, 1);
print " |
";
diff --git a/htdocs/eventorganization/conferenceorbooth_document.php b/htdocs/eventorganization/conferenceorbooth_document.php
index 742585ffb16..739e6f81036 100644
--- a/htdocs/eventorganization/conferenceorbooth_document.php
+++ b/htdocs/eventorganization/conferenceorbooth_document.php
@@ -257,7 +257,7 @@ if (!empty($withproject)) {
print '';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
print $form->showCategories($projectstatic->id, Categorie::TYPE_PROJECT, 1);
print " |
";
diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php
index 6d42d881ab8..958d1ab897d 100644
--- a/htdocs/eventorganization/conferenceorbooth_list.php
+++ b/htdocs/eventorganization/conferenceorbooth_list.php
@@ -382,7 +382,7 @@ if ($projectid > 0) {
print '';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
print $form->showCategories($project->id, Categorie::TYPE_PROJECT, 1);
print " |
";
diff --git a/htdocs/eventorganization/conferenceorboothattendee_card.php b/htdocs/eventorganization/conferenceorboothattendee_card.php
index c60c0418d43..b02edfc4a34 100644
--- a/htdocs/eventorganization/conferenceorboothattendee_card.php
+++ b/htdocs/eventorganization/conferenceorboothattendee_card.php
@@ -327,7 +327,7 @@ if (!empty($withproject)) {
print '';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
print $form->showCategories($projectstatic->id, 'project', 1);
print " |
";
diff --git a/htdocs/eventorganization/conferenceorboothattendee_list.php b/htdocs/eventorganization/conferenceorboothattendee_list.php
index 878b1baf992..972e546255f 100644
--- a/htdocs/eventorganization/conferenceorboothattendee_list.php
+++ b/htdocs/eventorganization/conferenceorboothattendee_list.php
@@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php';
require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php';
-if ($conf->categorie->enabled) {
+if (isModEnabled('categorie')) {
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
}
@@ -510,7 +510,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
print '';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
print $form->showCategories($projectstatic->id, 'project', 1);
print " |
";
diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php
index 6e2bee75e6e..9d76d46cc97 100644
--- a/htdocs/fichinter/card.php
+++ b/htdocs/fichinter/card.php
@@ -40,7 +40,7 @@ if (!empty($conf->projet->enabled)) {
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
}
-if ($conf->contrat->enabled) {
+if (isModEnabled('contrat')) {
require_once DOL_DOCUMENT_ROOT."/core/class/html.formcontract.class.php";
require_once DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php";
}
@@ -928,7 +928,7 @@ if ($action == 'create') {
}
// Contract
- if ($conf->contrat->enabled) {
+ if (isModEnabled('contrat')) {
$langs->load("contracts");
print '
| '.$langs->trans("Contract").' | ';
$numcontrat = $formcontract->select_contract($soc->id, GETPOST('contratid', 'int'), 'contratid', 0, 1, 1);
diff --git a/htdocs/knowledgemanagement/knowledgerecord_card.php b/htdocs/knowledgemanagement/knowledgerecord_card.php
index 0c7ed519042..e9c58bf31a4 100644
--- a/htdocs/knowledgemanagement/knowledgerecord_card.php
+++ b/htdocs/knowledgemanagement/knowledgerecord_card.php
@@ -411,7 +411,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print ' |
| '.$langs->trans("Categories").' | ';
print $form->showCategories($object->id, Categorie::TYPE_KNOWLEDGEMANAGEMENT, 1);
print " |
";
diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php
index 37ab6194da5..e6f560d7a42 100644
--- a/htdocs/loan/class/loan.class.php
+++ b/htdocs/loan/class/loan.class.php
@@ -224,15 +224,15 @@ class Loan extends CommonObject
$this->error = "ErrorBadParameter";
return -2;
}
- if (($conf->accounting->enabled) && empty($this->account_capital)) {
+ if (isModEnabled('accounting') && empty($this->account_capital)) {
$this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("LoanAccountancyCapitalCode"));
return -2;
}
- if (($conf->accounting->enabled) && empty($this->account_insurance)) {
+ if (isModEnabled('accounting') && empty($this->account_insurance)) {
$this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("LoanAccountancyInsuranceCode"));
return -2;
}
- if (($conf->accounting->enabled) && empty($this->account_interest)) {
+ if (isModEnabled('accounting') && empty($this->account_interest)) {
$this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("LoanAccountancyInterestCode"));
return -2;
}
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index 3b8b19a335c..1f63b5071bb 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -2127,7 +2127,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}
// Tags-Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 1);
$c = new Categorie($db);
@@ -2632,7 +2632,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print ' |
| '.$langs->trans("Categories").' | ';
print $form->showCategories($object->id, Categorie::TYPE_PRODUCT, 1);
print " |
";
diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php
index 8d9188f1965..b77997fcfc7 100644
--- a/htdocs/product/stats/card.php
+++ b/htdocs/product/stats/card.php
@@ -206,7 +206,7 @@ if ($result || !($id > 0)) {
print '';
// Tag
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
$moreforfilter .= img_picto($langs->trans("Categories"), 'category', 'class="pictofixedwidth"');
$moreforfilter .= $htmlother->select_categories(Categorie::TYPE_PRODUCT, $search_categ, 'search_categ', 1, 1, 'widthcentpercentminusx maxwidth400');
@@ -303,49 +303,49 @@ if ($result || !($id > 0)) {
}
}
- if ($conf->propal->enabled) {
+ if (isModEnabled('propal')) {
$graphfiles['propal'] = array('modulepart'=>'productstats_proposals',
'file' => $object->id.'/propal12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.($search_year > 0 ? '_year'.$search_year : '').'.png',
'label' => ($mode == 'byunit' ? $langs->transnoentitiesnoconv("NumberOfUnitsProposals") : $langs->transnoentitiesnoconv("NumberOfProposals")));
}
- if ($conf->supplier_proposal->enabled) {
+ if (isModEnabled('supplier_proposal')) {
$graphfiles['proposalssuppliers'] = array('modulepart'=>'productstats_proposalssuppliers',
'file' => $object->id.'/proposalssuppliers12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.($search_year > 0 ? '_year'.$search_year : '').'.png',
'label' => ($mode == 'byunit' ? $langs->transnoentitiesnoconv("NumberOfUnitsSupplierProposals") : $langs->transnoentitiesnoconv("NumberOfSupplierProposals")));
}
- if ($conf->order->enabled) {
+ if (isModEnabled('order')) {
$graphfiles['orders'] = array('modulepart'=>'productstats_orders',
'file' => $object->id.'/orders12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.($search_year > 0 ? '_year'.$search_year : '').'.png',
'label' => ($mode == 'byunit' ? $langs->transnoentitiesnoconv("NumberOfUnitsCustomerOrders") : $langs->transnoentitiesnoconv("NumberOfCustomerOrders")));
}
- if ($conf->supplier_order->enabled) {
+ if (isModEnabled('supplier_order')) {
$graphfiles['orderssuppliers'] = array('modulepart'=>'productstats_orderssuppliers',
'file' => $object->id.'/orderssuppliers12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.($search_year > 0 ? '_year'.$search_year : '').'.png',
'label' => ($mode == 'byunit' ? $langs->transnoentitiesnoconv("NumberOfUnitsSupplierOrders") : $langs->transnoentitiesnoconv("NumberOfSupplierOrders")));
}
- if ($conf->facture->enabled) {
+ if (isModEnabled('facture')) {
$graphfiles['invoices'] = array('modulepart'=>'productstats_invoices',
'file' => $object->id.'/invoices12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.($search_year > 0 ? '_year'.$search_year : '').'.png',
'label' => ($mode == 'byunit' ? $langs->transnoentitiesnoconv("NumberOfUnitsCustomerInvoices") : $langs->transnoentitiesnoconv("NumberOfCustomerInvoices")));
}
- if ($conf->supplier_invoice->enabled) {
+ if (isModEnabled('supplier_invoice')) {
$graphfiles['invoicessuppliers'] = array('modulepart'=>'productstats_invoicessuppliers',
'file' => $object->id.'/invoicessuppliers12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.($search_year > 0 ? '_year'.$search_year : '').'.png',
'label' => ($mode == 'byunit' ? $langs->transnoentitiesnoconv("NumberOfUnitsSupplierInvoices") : $langs->transnoentitiesnoconv("NumberOfSupplierInvoices")));
}
- if ($conf->contrat->enabled) {
+ if (isModEnabled('contrat')) {
$graphfiles['contracts'] = array('modulepart'=>'productstats_contracts',
'file' => $object->id.'/contracts12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.($search_year > 0 ? '_year'.$search_year : '').'.png',
'label' => ($mode == 'byunit' ? $langs->transnoentitiesnoconv("NumberOfUnitsContracts") : $langs->transnoentitiesnoconv("NumberOfContracts")));
}
- if ($conf->mrp->enabled) {
+ if (isModEnabled('mrp')) {
$graphfiles['mrp'] = array('modulepart'=>'productstats_mrp',
'file' => $object->id.'/mos12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.($search_year > 0 ? '_year'.$search_year : '').'.png',
'label' => ($mode == 'byunit' ? $langs->transnoentitiesnoconv("NumberOfUnitsMos") : $langs->transnoentitiesnoconv("NumberOfMos")));
diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php
index 252763ef43b..2b8ee3db6a4 100644
--- a/htdocs/product/stock/card.php
+++ b/htdocs/product/stock/card.php
@@ -545,7 +545,7 @@ if ($action == 'create') {
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print ' |
| '.$langs->trans("Categories").' | ';
print $form->showCategories($object->id, Categorie::TYPE_WAREHOUSE, 1);
print " |
";
@@ -919,7 +919,7 @@ if ($action == 'create') {
}
// Tags-Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_WAREHOUSE, '', 'parent', 64, 0, 1);
$c = new Categorie($db);
diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php
index 2ad77fca49e..775e07d6118 100644
--- a/htdocs/product/stock/movement_list.php
+++ b/htdocs/product/stock/movement_list.php
@@ -903,7 +903,7 @@ if ($object->id > 0) {
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print ' |
| '.$langs->trans("Categories").' | ';
print $form->showCategories($object->id, Categorie::TYPE_WAREHOUSE, 1);
print " |
";
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index 4f7cb3ce7a0..65cf89c89da 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -1001,7 +1001,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
print '';
// Tags-Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PROJECT, '', 'parent', 64, 0, 1);
$c = new Categorie($db);
@@ -1170,7 +1170,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
print ' |
';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1);
print " |
";
diff --git a/htdocs/projet/comment.php b/htdocs/projet/comment.php
index 3bea4b5db03..997f45a39d0 100644
--- a/htdocs/projet/comment.php
+++ b/htdocs/projet/comment.php
@@ -167,7 +167,7 @@ print nl2br($object->description);
print '';
// Categories
-if ($conf->categorie->enabled) {
+if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1);
print " |
";
diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php
index 3230c325039..be130572704 100644
--- a/htdocs/projet/contact.php
+++ b/htdocs/projet/contact.php
@@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
-if ($conf->categorie->enabled) {
+if (isModEnabled('categorie')) {
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
}
@@ -421,7 +421,7 @@ if ($id > 0 || !empty($ref)) {
print '';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1);
print " |
";
diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php
index 5d463d6a186..b8fe8572eb6 100644
--- a/htdocs/projet/element.php
+++ b/htdocs/projet/element.php
@@ -343,7 +343,7 @@ print nl2br($object->description);
print '';
// Categories
-if ($conf->categorie->enabled) {
+if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1);
print " |
";
diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php
index c0dd96537a6..dda13754d31 100644
--- a/htdocs/projet/ganttview.php
+++ b/htdocs/projet/ganttview.php
@@ -216,7 +216,7 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) {
print '';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1);
print " |
";
diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php
index c08880e44ea..410b637f3e6 100644
--- a/htdocs/projet/tasks.php
+++ b/htdocs/projet/tasks.php
@@ -648,7 +648,7 @@ if ($id > 0 || !empty($ref)) {
print '';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1);
print " |
";
diff --git a/htdocs/projet/tasks/comment.php b/htdocs/projet/tasks/comment.php
index e2686ded9f2..82628d5136b 100644
--- a/htdocs/projet/tasks/comment.php
+++ b/htdocs/projet/tasks/comment.php
@@ -258,7 +258,7 @@ if ($id > 0 || !empty($ref)) {
print '';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
print $form->showCategories($projectstatic->id, 'project', 1);
print " |
";
diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php
index 327d8783256..9718a0ffccb 100644
--- a/htdocs/projet/tasks/contact.php
+++ b/htdocs/projet/tasks/contact.php
@@ -289,7 +289,7 @@ if ($id > 0 || !empty($ref)) {
print '';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
print $form->showCategories($projectstatic->id, 'project', 1);
print " |
";
diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php
index 0e520989d8c..bd696e90434 100644
--- a/htdocs/projet/tasks/document.php
+++ b/htdocs/projet/tasks/document.php
@@ -245,7 +245,7 @@ if ($object->id > 0) {
print '';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
print $form->showCategories($projectstatic->id, 'project', 1);
print " |
";
diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php
index 652b195afd4..206a92afb36 100644
--- a/htdocs/projet/tasks/note.php
+++ b/htdocs/projet/tasks/note.php
@@ -235,7 +235,7 @@ if ($object->id > 0) {
print '';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
print $form->showCategories($projectstatic->id, 'project', 1);
print " |
";
diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php
index 9fce4072183..5b0f097d22f 100644
--- a/htdocs/projet/tasks/task.php
+++ b/htdocs/projet/tasks/task.php
@@ -333,7 +333,7 @@ if ($id > 0 || !empty($ref)) {
print '';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
print $form->showCategories($projectstatic->id, 'project', 1);
print " |
";
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index 3718fe55e27..41545b96d34 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -868,7 +868,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
print '';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
| '.$langs->trans("Categories").' | ';
print $form->showCategories($projectstatic->id, 'project', 1);
print " |
";
diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php
index 5f997a37e9c..bd4aacc3931 100644
--- a/htdocs/societe/consumption.php
+++ b/htdocs/societe/consumption.php
@@ -199,13 +199,13 @@ if ($object->fournisseur) {
$obj = $db->fetch_object($resql);
$nbCmdsFourn = $obj->nb;
$thirdTypeArray['supplier'] = $langs->trans("supplier");
- if (($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire)) {
+ if ((isModEnabled('fournisseur') && $user->rights->fournisseur->facture->lire && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire)) {
$elementTypeArray['supplier_invoice'] = $langs->transnoentitiesnoconv('SuppliersInvoices');
}
- if (($conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->lire)) {
+ if ((isModEnabled('fournisseur') && $user->rights->fournisseur->commande->lire && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->lire)) {
$elementTypeArray['supplier_order'] = $langs->transnoentitiesnoconv('SuppliersOrders');
}
- if ($conf->supplier_proposal->enabled && $user->rights->supplier_proposal->lire) {
+ if (isModEnabled('supplier_proposal') && $user->rights->supplier_proposal->lire) {
$elementTypeArray['supplier_proposal'] = $langs->transnoentitiesnoconv('SupplierProposals');
}
}
diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php
index e2ac40f8770..90be0b25850 100644
--- a/htdocs/societe/paymentmodes.php
+++ b/htdocs/societe/paymentmodes.php
@@ -838,16 +838,16 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
$obj = $db->fetch_object($resql);
$nbFactsClient = $obj->nb;
$thirdTypeArray['customer'] = $langs->trans("customer");
- if ($conf->propal->enabled && $user->rights->propal->lire) {
+ if (isModEnabled('propal') && $user->rights->propal->lire) {
$elementTypeArray['propal'] = $langs->transnoentitiesnoconv('Proposals');
}
- if ($conf->commande->enabled && $user->rights->commande->lire) {
+ if (isModEnabled('commande') && $user->rights->commande->lire) {
$elementTypeArray['order'] = $langs->transnoentitiesnoconv('Orders');
}
- if ($conf->facture->enabled && $user->rights->facture->lire) {
+ if (isModEnabled('facture') && $user->rights->facture->lire) {
$elementTypeArray['invoice'] = $langs->transnoentitiesnoconv('Invoices');
}
- if ($conf->contrat->enabled && $user->rights->contrat->lire) {
+ if (isModEnabled('contrat') && $user->rights->contrat->lire) {
$elementTypeArray['contract'] = $langs->transnoentitiesnoconv('Contracts');
}
}
diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php
index ce791613bcb..59ee7e52d06 100755
--- a/htdocs/ticket/card.php
+++ b/htdocs/ticket/card.php
@@ -1121,7 +1121,7 @@ if ($action == 'create' || $action == 'presend') {
print '
';
// Categories
- if ($conf->categorie->enabled) {
+ if (isModEnabled('categorie')) {
print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '