diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index e2d03790f78..80f78b614b9 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -7,7 +7,7 @@ * Copyright (C) 2014-2018 Ferran Marcet * Copyright (C) 2014-2022 Charlene Benke * Copyright (C) 2015-2016 Abbes Bahfir - * Copyright (C) 2018 Philippe Grand + * Copyright (C) 2018-2022 Philippe Grand * Copyright (C) 2020 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/fichinter/modules_fichinter.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } @@ -787,7 +787,7 @@ $formfile = new FormFile($db); if (!empty($conf->contrat->enabled)) { $formcontract = new FormContract($db); } -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $formproject = new FormProjets($db); } @@ -908,7 +908,7 @@ if ($action == 'create') { print ''; // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $formproject = new FormProjets($db); $langs->load("project"); @@ -1159,7 +1159,7 @@ if ($action == 'create') { // Thirdparty $morehtmlref .= '
'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'customer'); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'.$langs->trans('Project').' '; if ($user->rights->ficheinter->creer) {