diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php
index d6e1517344a..15af4a532fa 100644
--- a/htdocs/blockedlog/class/blockedlog.class.php
+++ b/htdocs/blockedlog/class/blockedlog.class.php
@@ -165,7 +165,7 @@ class BlockedLog
*/
// Donation
- if (!empty($conf->don->enabled)) {
+ if (isModEnabled('don')) {
$this->trackedevents['DON_VALIDATE'] = 'logDON_VALIDATE';
$this->trackedevents['DON_DELETE'] = 'logDON_DELETE';
//$this->trackedevents['DON_SENTBYMAIL']='logDON_SENTBYMAIL';
diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index aa54b3f330c..a2abdbb7cc6 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -1634,7 +1634,7 @@ class FormMail extends Form
if (isModEnabled('adherent')) {
$tmparray['__SECUREKEYPAYMENT_MEMBER__'] = 'SecureKeyPAYMENTUniquePerMember';
}
- if (!empty($conf->don->enabled)) {
+ if (isModEnabled('don')) {
$tmparray['__SECUREKEYPAYMENT_DONATION__'] = 'SecureKeyPAYMENTUniquePerDonation';
}
if (isModEnabled('facture')) {
@@ -1651,7 +1651,7 @@ class FormMail extends Form
if (isModEnabled('adherent')) {
$tmparray['__ONLINEPAYMENTLINK_MEMBER__'] = 'OnlinePaymentLinkUniquePerMember';
}
- if (!empty($conf->don->enabled)) {
+ if (isModEnabled('don')) {
$tmparray['__ONLINEPAYMENTLINK_DONATION__'] = 'OnlinePaymentLinkUniquePerDonation';
}
if (isModEnabled('facture')) {
diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index d6e29509cee..81c27deee76 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -177,7 +177,7 @@ function project_prepare_head(Project $project, $moreparam = '')
if (isModEnabled('expensereport')) {
$nbElements += $project->getElementCount('expensereport', 'expensereport');
}
- if (!empty($conf->don->enabled)) {
+ if (isModEnabled('don')) {
$nbElements += $project->getElementCount('donation', 'don');
}
if (!empty($conf->loan->enabled)) {
diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php
index c000ebdf783..5ba96ad92aa 100644
--- a/htdocs/core/modules/modCategorie.class.php
+++ b/htdocs/core/modules/modCategorie.class.php
@@ -180,7 +180,7 @@ class modCategorie extends DolibarrModules
$this->export_code[$r] = $this->rights_class.'_0_'.Categorie::$MAP_ID_TO_CODE[0];
$this->export_label[$r] = 'CatProdList';
$this->export_icon[$r] = $this->picto;
- $this->export_enabled[$r] = 'isModEnabled("product") || !empty($conf->service->enabled)';
+ $this->export_enabled[$r] = 'isModEnabled("product") || isModEnabled('service')';
$this->export_permission[$r] = array(array("categorie", "lire"), array("produit", "export"));
$this->export_fields_array[$r] = array('cat.rowid'=>"CategId", 'cat.label'=>"Label", 'cat.description'=>"Description", 'cat.fk_parent'=>"ParentCategoryID", 'pcat.label'=>"ParentCategoryLabel", 'p.rowid'=>'ProductId', 'p.ref'=>'Ref', 'p.label'=>'Label');
$this->export_TypeFields_array[$r] = array('cat.rowid'=>'Numeric', 'cat.label'=>"Text", 'cat.description'=>"Text", 'cat.fk_parent'=>'Numeric', 'pcat.label'=>'Text', 'p.rowid'=>'Numeric', 'p.ref'=>'Text', 'p.label'=>'Text');
diff --git a/htdocs/core/tpl/onlinepaymentlinks.tpl.php b/htdocs/core/tpl/onlinepaymentlinks.tpl.php
index 611c556d98c..3693c818112 100644
--- a/htdocs/core/tpl/onlinepaymentlinks.tpl.php
+++ b/htdocs/core/tpl/onlinepaymentlinks.tpl.php
@@ -118,7 +118,7 @@ if (isModEnabled('adherent')) {
}
print '
';
}
-if (!empty($conf->don->enabled)) {
+if (isModEnabled('don')) {
print '