diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php
index 13dffc545aa..589f7ca0590 100644
--- a/htdocs/ticket/card.php
+++ b/htdocs/ticket/card.php
@@ -34,12 +34,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
-if (!empty($conf->project->enabled)) {
+if (isModEnabled('project')) {
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
include_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
}
-if (!empty($conf->contrat->enabled)) {
+if (isModEnabled('contrat')) {
include_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php';
include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formcontract.class.php';
@@ -698,7 +698,7 @@ if (empty($reshook)) {
$userstat = new User($db);
$form = new Form($db);
$formticket = new FormTicket($db);
-if (!empty($conf->project->enabled)) {
+if (isModEnabled('project')) {
$formproject = new FormProjets($db);
}
@@ -940,7 +940,7 @@ if ($action == 'create' || $action == 'presend') {
}
// Thirdparty
- if (!empty($conf->societe->enabled)) {
+ if (isModEnabled('societe')) {
$morehtmlref .= '
'.$langs->trans('ThirdParty').' ';
if ($action != 'editcustomer' && $object->status < 8 && !$user->socid && $user->rights->ticket->write) {
$morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('Edit'), 0).' : ';
@@ -953,7 +953,7 @@ if ($action == 'create' || $action == 'presend') {
}
// Project
- if (!empty($conf->project->enabled)) {
+ if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
'.$langs->trans('Project').' ';
if ($user->rights->ticket->write) {
@@ -1107,7 +1107,7 @@ if ($action == 'create' || $action == 'presend') {
print '';
// Timing (Duration sum of linked fichinter)
- if (!empty($conf->ficheinter->enabled)) {
+ if (isModEnabled('ficheinter')) {
$object->fetchObjectLinked();
$num = count($object->linkedObjects);
$timing = 0;