diff --git a/htdocs/fichinter/index.php b/htdocs/fichinter/index.php index 06e5ca0b21f..c7b150b7d2d 100644 --- a/htdocs/fichinter/index.php +++ b/htdocs/fichinter/index.php @@ -170,7 +170,7 @@ if ($resql) { /* * Draft orders */ -if (!empty($conf->ficheinter->enabled)) { +if (isModEnabled('ficheinter')) { $sql = "SELECT f.rowid, f.ref, s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."fichinter as f"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; @@ -293,7 +293,7 @@ if ($resql) { * interventions to process */ -if (!empty($conf->ficheinter->enabled)) { +if (isModEnabled('ficheinter')) { $sql = "SELECT f.rowid, f.ref, f.fk_statut, s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."fichinter as f"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index e40a3528854..af6d576d159 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -1369,7 +1369,7 @@ if ($action == 'create' && $user->rights->projet->creer) { $langs->load("suppliers"); print dolGetButtonAction('', $langs->trans('AddSupplierInvoice'), 'default', DOL_URL_ROOT.'/fourn/facture/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid, '', 1, array('isDropDown' => true)); } - if (!empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer) { + if (isModEnabled('ficheinter') && $user->rights->ficheinter->creer) { $langs->load("interventions"); print dolGetButtonAction('', $langs->trans('AddIntervention'), 'default', DOL_URL_ROOT.'/fichinter/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid, '', 1, array('isDropDown' => true)); } diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index bc29d2dca1e..16ccf195852 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -62,7 +62,7 @@ if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMO if (isModEnabled('contrat')) { require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; } -if (!empty($conf->ficheinter->enabled)) { +if (isModEnabled('ficheinter')) { require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; } if (isModEnabled("expedition")) { @@ -114,7 +114,7 @@ if (isModEnabled('commande')) { if (isModEnabled("propal")) { $langs->load("propal"); } -if (!empty($conf->ficheinter->enabled)) { +if (isModEnabled('ficheinter')) { $langs->load("interventions"); } if (isModEnabled('deplacement')) { diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 9e5e9c8618d..b25ad6fa202 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -1060,7 +1060,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser //'builddoc'=>$langs->trans("PDFMerge"), ); } - if ( !empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer) { + if ( isModEnabled('ficheinter') && $user->rights->ficheinter->creer) { $langs->load("interventions"); $arrayofmassactions['generateinter'] = $langs->trans("GenerateInter"); } diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index 0ff76102582..83961ac74cf 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -181,7 +181,7 @@ if ($object->client) { } } -if (!empty($conf->ficheinter->enabled) && !empty($user->rights->ficheinter->lire)) { +if (isModEnabled('ficheinter') && !empty($user->rights->ficheinter->lire)) { $elementTypeArray['fichinter'] = $langs->transnoentitiesnoconv('Interventions'); } diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index a056bbd30df..79fbf1490d5 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -199,7 +199,7 @@ if (isModEnabled('holiday') || isModEnabled('expensereport')) { if (isModEnabled("product") || isModEnabled("service")) { $tmparray['product/index.php?mainmenu=products&leftmenu='] = 'ProductsAndServicesArea'; } -if (isModEnabled("propal") || isModEnabled('commande') || !empty($conf->ficheinter->enabled) || isModEnabled('contrat')) { +if (isModEnabled("propal") || isModEnabled('commande') || isModEnabled('ficheinter') || isModEnabled('contrat')) { $tmparray['comm/index.php?mainmenu=commercial&leftmenu='] = 'CommercialArea'; } if (!empty($conf->comptabilite->enabled) || isModEnabled('accounting')) {