diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php
index 6f6ddc5383e..380c5813155 100644
--- a/htdocs/comm/action/card.php
+++ b/htdocs/comm/action/card.php
@@ -1411,7 +1411,7 @@ if ($action == 'create') {
}
// Project
- if (!empty($conf->project->enabled)) {
+ if (isModEnabled('project')) {
$langs->load("projects");
$projectid = GETPOST('projectid', 'int');
@@ -1914,7 +1914,7 @@ if ($id > 0) {
}
// Project
- if (!empty($conf->project->enabled)) {
+ if (isModEnabled('project')) {
$langs->load("projects");
print '
| '.$langs->trans("Project").' | ';
@@ -1939,7 +1939,7 @@ if ($id > 0) {
print ' |
';
print '| '.$langs->trans("LinkedObject").' | ';
- if ($object->elementtype == 'task' && !empty($conf->project->enabled)) {
+ if ($object->elementtype == 'task' && isModEnabled('project')) {
print '';
$urloption = '?action=create&donotclearsession=1'; // we use create not edit for more flexibility
@@ -2132,7 +2132,7 @@ if ($id > 0) {
// Thirdparty
//$morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
// Project
- if (!empty($conf->project->enabled)) {
+ if (isModEnabled('project')) {
$langs->load("projects");
//$morehtmlref.=' '.$langs->trans('Project') . ' ';
$morehtmlref .= $langs->trans('Project').' ';
|