Use isModEnabled
This commit is contained in:
parent
8f41a59fce
commit
83da806172
@ -38,7 +38,7 @@ $codeventil = GETPOST('codeventil', 'int');
|
|||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (empty($conf->accounting->enabled)) {
|
if (!isModEnabled('accounting')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if ($user->socid > 0) {
|
if ($user->socid > 0) {
|
||||||
|
|||||||
@ -40,7 +40,7 @@ $validatemonth = GETPOST('validatemonth', 'int');
|
|||||||
$validateyear = GETPOST('validateyear', 'int');
|
$validateyear = GETPOST('validateyear', 'int');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (empty($conf->accounting->enabled)) {
|
if (!isModEnabled('accounting')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if ($user->socid > 0) {
|
if ($user->socid > 0) {
|
||||||
@ -77,7 +77,7 @@ $action = GETPOST('action', 'aZ09');
|
|||||||
$chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');
|
$chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (empty($conf->accounting->enabled)) {
|
if (!isModEnabled('accounting')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if ($user->socid > 0) {
|
if ($user->socid > 0) {
|
||||||
@ -622,7 +622,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) { // This part of code looks strange
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|
||||||
if (!empty($conf->margin->enabled)) {
|
if (isModEnabled('margin')) {
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user