From 5a2fb2c3f4e258689891c6313b173de6f7abb3ca Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 29 Aug 2022 10:47:07 +0200 Subject: [PATCH] Use IsModEnabled --- htdocs/ticket/card.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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;