Use isModEnabled
This commit is contained in:
parent
3bb28205a3
commit
e707f1c03c
@ -91,7 +91,7 @@ print load_fiche_titre($langs->trans("DonationsArea"), '', 'object_donation');
|
||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
|
||||
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');
|
||||
}
|
||||
|
||||
|
||||
@ -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));
|
||||
}
|
||||
|
||||
@ -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)) {
|
||||
|
||||
@ -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');
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user