diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php
index 7e9264614cd..ea371e804f3 100644
--- a/htdocs/compta/accounting-files.php
+++ b/htdocs/compta/accounting-files.php
@@ -601,7 +601,7 @@ if (isModEnabled('multicompany') && is_object($mc)) {
print '
';
// Project filter
-if (!empty($conf->projet->enabled)) {
+if (isModEnabled('projet')) {
$formproject = new FormProjets($db);
$langs->load('projects');
print ''.$langs->trans('Project').":";
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index a63dab49dbb..52092eb8b94 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -1276,7 +1276,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
if (empty($reshook)) {
if ($action != "edit" && $action != 'presend') {
// Create event
- /*if ($conf->agenda->enabled && !empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a
+ /*if (isModEnabled('agenda') && !empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a
// "workflow" action so should appears somewhere else on
// page.
{
@@ -1292,7 +1292,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
// Accounting Report
/*
- $accouting_module_activated = !empty($conf->comptabilite->enabled) || isModEnabled('accounting');
+ $accouting_module_activated = isModEnabled('comptabilite') || isModEnabled('accounting');
if ($accouting_module_activated && $object->statut != Project::STATUS_DRAFT) {
$start = dol_getdate((int) $object->date_start);
$end = dol_getdate((int) $object->date_end);