diff --git a/htdocs/don/list.php b/htdocs/don/list.php
index 68f8ab0bbea..73314d9727c 100644
--- a/htdocs/don/list.php
+++ b/htdocs/don/list.php
@@ -27,7 +27,7 @@
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
-if (!empty($conf->project->enabled)) {
+if (isModEnabled('project')) {
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
}
@@ -93,7 +93,7 @@ $fieldstosearchall = array(
$donationstatic = new Don($db);
$form = new Form($db);
-if (!empty($conf->project->enabled)) {
+if (isModEnabled('project')) {
$projectstatic = new Project($db);
}
@@ -219,7 +219,7 @@ if ($resql) {
print '
';
print ' ';
print ' | ';
- if (!empty($conf->project->enabled)) {
+ if (isModEnabled('project')) {
print '';
print ' ';
print ' | ';
@@ -249,7 +249,7 @@ if ($resql) {
}
print_liste_field_titre("Name", $_SERVER["PHP_SELF"], "d.lastname", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "d.datedon", "", $param, '', $sortfield, $sortorder, 'center ');
- if (!empty($conf->project->enabled)) {
+ if (isModEnabled('project')) {
$langs->load("projects");
print_liste_field_titre("Project", $_SERVER["PHP_SELF"], "d.fk_projet", "", $param, "", $sortfield, $sortorder);
}
@@ -280,7 +280,7 @@ if ($resql) {
}
print "".$donationstatic->getFullName($langs)." | ";
print ''.dol_print_date($db->jdate($objp->datedon), 'day').' | ';
- if (!empty($conf->project->enabled)) {
+ if (isModEnabled('project')) {
print "";
if ($objp->pid) {
$projectstatic->id = $objp->pid;
|