瀏覽代碼

Use isModEnabled

Alexandre SPANGARO 2 年之前
父節點
當前提交
01631a251c
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      htdocs/accountancy/customer/lines.php
  2. 1 1
      htdocs/accountancy/customer/list.php

+ 1 - 1
htdocs/accountancy/customer/lines.php

@@ -85,7 +85,7 @@ if (!$sortorder) {
 }
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 1 - 1
htdocs/accountancy/customer/list.php

@@ -104,7 +104,7 @@ $accountingAccount = new AccountingAccount($db);
 $chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {