';
// Tags / Categories
- if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
+ if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) {
print '
'.$langs->trans("Categories").'
';
print '
';
print $form->showCategories($object->id, Categorie::TYPE_MEMBER, 1);
@@ -1813,7 +1813,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
// Third party Dolibarr
- if (!empty($conf->societe->enabled)) {
+ if (isModEnabled('societe')) {
print '
';
$editenable = $user->rights->adherent->creer;
print $form->editfieldkey('LinkedToDolibarrThirdParty', 'thirdparty', '', $object, $editenable);
@@ -1951,7 +1951,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}
// Create third party
- if (!empty($conf->societe->enabled) && !$object->socid) {
+ if (isModEnabled('societe') && !$object->socid) {
if ($user->rights->societe->creer) {
if (Adherent::STATUS_DRAFT != $object->statut) {
print 'id.'&action=create_thirdparty" title="'.dol_escape_htmltag($langs->trans("CreateDolibarrThirdPartyDesc")).'">'.$langs->trans("CreateDolibarrThirdParty").''."\n";
@@ -1977,7 +1977,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}
// Action SPIP
- if (!empty($conf->mailmanspip->enabled) && !empty($conf->global->ADHERENT_USE_SPIP)) {
+ if (isModEnabled('mailmanspip') && !empty($conf->global->ADHERENT_USE_SPIP)) {
$isinspip = $mailmanspip->is_in_spip($object);
if ($isinspip == 1) {
@@ -2034,7 +2034,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
*/
// Show online payment link
- $useonlinepayment = (!empty($conf->paypal->enabled) || !empty($conf->stripe->enabled) || !empty($conf->paybox->enabled));
+ $useonlinepayment = (isModEnabled('paypal') || isModEnabled('stripe') || isModEnabled('paybox'));
if ($useonlinepayment) {
print ' ';
diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php
index 3fa4c4b3e7f..c19fa40c2bc 100644
--- a/htdocs/adherents/subscription/list.php
+++ b/htdocs/adherents/subscription/list.php
@@ -89,7 +89,7 @@ $arrayfields = array(
'd.firstname'=>array('label'=>"Firstname", 'checked'=>1),
'd.login'=>array('label'=>"Login", 'checked'=>1),
't.libelle'=>array('label'=>"Label", 'checked'=>1),
- 'd.bank'=>array('label'=>"BankAccount", 'checked'=>1, 'enabled'=>(!empty($conf->banque->enabled))),
+ 'd.bank'=>array('label'=>"BankAccount", 'checked'=>1, 'enabled'=>(isModEnabled('banque'))),
/*'d.note_public'=>array('label'=>"NotePublic", 'checked'=>0),
'd.note_private'=>array('label'=>"NotePrivate", 'checked'=>0),*/
'c.dateadh'=>array('label'=>"DateSubscription", 'checked'=>1, 'position'=>100),
diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php
index 52926cf1b19..3221738bcd3 100644
--- a/htdocs/admin/agenda.php
+++ b/htdocs/admin/agenda.php
@@ -184,7 +184,7 @@ if (!empty($triggers)) {
}
//print 'module='.$module.' code='.$trigger['code'].' ';
- if (!empty($conf->$module->enabled)) {
+ if (isModEnabled('module')) {
// Discard special case: If option FICHINTER_CLASSIFY_BILLED is not set, we discard both trigger FICHINTER_CLASSIFY_BILLED and FICHINTER_CLASSIFY_UNBILLED
if ($trigger['code'] == 'FICHINTER_CLASSIFY_BILLED' && empty($conf->global->FICHINTER_CLASSIFY_BILLED)) {
continue;
diff --git a/htdocs/admin/agenda_reminder.php b/htdocs/admin/agenda_reminder.php
index 79aa081ddef..166c24f2188 100644
--- a/htdocs/admin/agenda_reminder.php
+++ b/htdocs/admin/agenda_reminder.php
@@ -206,7 +206,7 @@ $job->fetch(0, 'ActionComm', 'sendEmailsReminder');
// AGENDA REMINDER EMAIL
print '
'."\n";
print '
'.$langs->trans('AGENDA_REMINDER_EMAIL', $langs->transnoentities("Module2300Name"));
-if (!empty($conf->cron->enabled)) {
+if (isModEnabled('cron')) {
if (!empty($conf->global->AGENDA_REMINDER_EMAIL)) {
if ($job->id > 0) {
if ($job->status == $job::STATUS_ENABLED) {
@@ -219,7 +219,7 @@ print '