diff --git a/htdocs/don/index.php b/htdocs/don/index.php index 9dc14918477..721cfb8d67a 100644 --- a/htdocs/don/index.php +++ b/htdocs/don/index.php @@ -91,7 +91,7 @@ print load_fiche_titre($langs->trans("DonationsArea"), '', 'object_donation'); print '
'; if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) { // TODO Add a search into global search combo so we can remove this - if (!empty($conf->don->enabled) && $user->rights->don->lire) { + if (isModEnabled('don') && $user->rights->don->lire) { $listofsearchfields['search_donation'] = array('text'=>'Donation'); } diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index af6d576d159..a63dab49dbb 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -1381,7 +1381,7 @@ if ($action == 'create' && $user->rights->projet->creer) { $langs->load("trips"); print dolGetButtonAction('', $langs->trans('AddTrip'), 'default', DOL_URL_ROOT.'/expensereport/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid, '', 1, array('isDropDown' => true)); } - if (!empty($conf->don->enabled) && $user->rights->don->creer) { + if (isModEnabled('don') && $user->rights->don->creer) { $langs->load("donations"); print dolGetButtonAction('', $langs->trans('AddDonation'), 'default', DOL_URL_ROOT.'/don/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid, '', 1, array('isDropDown' => true)); } diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 16ccf195852..032677c27d8 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -77,7 +77,7 @@ if (isModEnabled('expensereport')) { if (isModEnabled('agenda')) { require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; } -if (!empty($conf->don->enabled)) { +if (isModEnabled('don')) { require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; } if (!empty($conf->loan->enabled)) { @@ -123,7 +123,7 @@ if (isModEnabled('deplacement')) { if (isModEnabled('expensereport')) { $langs->load("trips"); } -if (!empty($conf->don->enabled)) { +if (isModEnabled('don')) { $langs->load("donations"); } if (!empty($conf->loan->enabled)) { diff --git a/htdocs/public/donations/donateurs_code.php b/htdocs/public/donations/donateurs_code.php index 4acbaa5a256..509eb553288 100644 --- a/htdocs/public/donations/donateurs_code.php +++ b/htdocs/public/donations/donateurs_code.php @@ -57,7 +57,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; // Security check -if (empty($conf->don->enabled)) { +if (!isModEnabled('don')) { httponly_accessforbidden('Module Donation not enabled'); }