From 5bf8b3ceb0cb755c90ff2dc13b307d79bc5d2892 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:17:38 +0200 Subject: [PATCH 01/27] FIX php8 compatibility --- htdocs/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/index.php b/htdocs/index.php index e5eb356c0ef..2a0a095b362 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -259,12 +259,12 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { $board = new RemiseCheque($db); $dashboardlines[$board->element] = $board->load_board($user); } - if (!empty($conf->prelevement->enabled)) { + if (isModEnabled('prelevement')) { include_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; $board = new BonPrelevement($db); $dashboardlines[$board->element.'_direct_debit'] = $board->load_board($user, 'direct_debit'); } - if (!empty($conf->paymentbybanktransfer->enabled)) { + if (isModEnabled('paymentbybanktransfer')) { include_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; $board = new BonPrelevement($db); $dashboardlines[$board->element.'_credit_transfer'] = $board->load_board($user, 'credit_transfer'); From 8291763539aca9e1f2548e18d5dff1e47d601edf Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:19:35 +0200 Subject: [PATCH 02/27] FIX php8 compatibility --- htdocs/accountancy/admin/accountmodel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index 9f873195465..201898dedd1 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -39,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; } @@ -126,7 +126,7 @@ $tabrowid[31] = ""; // Condition to show dictionary in setup page $tabcond = array(); -$tabcond[31] = !empty($conf->accounting->enabled); +$tabcond[31] = isModEnabled('accounting'); // List of help for fields $tabhelp = array(); From f4e1f80a4933266a53d602dfeeb65eb67f433c24 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:20:27 +0200 Subject: [PATCH 03/27] FIX php8 compatibility --- htdocs/accountancy/admin/categories_list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index c0439445261..ea613ea38cd 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -111,7 +111,7 @@ $tabrowid[32] = ""; // Condition to show dictionary in setup page $tabcond = array(); -$tabcond[32] = !empty($conf->accounting->enabled); +$tabcond[32] = isModEnabled('accounting'); // List of help for fields $tabhelp = array(); @@ -875,7 +875,7 @@ function fieldListAccountingCategories($fieldlist, $obj = '', $tabname = '', $co $formadmin = new FormAdmin($db); $formcompany = new FormCompany($db); - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { $formaccounting = new FormAccounting($db); } From 4296f704a54b8f6b1a63b0e6d423decbf3d206e6 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:20:59 +0200 Subject: [PATCH 04/27] FIX php8 compatibility --- htdocs/accountancy/admin/journals_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index 39300579d5f..3ea90e283ce 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -123,7 +123,7 @@ $tabrowid[35] = ""; // Condition to show dictionary in setup page $tabcond = array(); -$tabcond[35] = !empty($conf->accounting->enabled); +$tabcond[35] = isModEnabled('accounting'); // List of help for fields $tabhelp = array(); From 9089ccc308f354f6384656488b0f5f85f4ff3d69 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:21:42 +0200 Subject: [PATCH 05/27] FIX php8 compatibility --- htdocs/accountancy/bookkeeping/balance.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 7a65fa0ffaa..2e91cea39b8 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -142,7 +142,7 @@ if (!empty($search_ledger_code)) { } } -if (empty($conf->accounting->enabled)) { +if (!isModEnabled('accounting')) { accessforbidden(); } if ($user->socid > 0) { From c35bcaffb813c9ba84e113378347589bced9a26c Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:22:18 +0200 Subject: [PATCH 06/27] FIX php8 compatibility --- htdocs/accountancy/bookkeeping/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 7c8c0dca547..c2071e76cea 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -79,7 +79,7 @@ if (!empty($update)) { $object = new BookKeeping($db); // Security check -if (empty($conf->accounting->enabled)) { +if (!isModEnabled('accounting')) { accessforbidden(); } if ($user->socid > 0) { From 395f7e63acfca45e747d0f349acd027ae5cac110 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:22:48 +0200 Subject: [PATCH 07/27] FIX php8 compatibility --- htdocs/accountancy/bookkeeping/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index bc229dd69f7..aa5e8dfc257 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -214,7 +214,7 @@ if (empty($listofformat[$formatexportset])) { $error = 0; -if (empty($conf->accounting->enabled)) { +if (!isModEnabled('accounting')) { accessforbidden(); } if ($user->socid > 0) { From 83753f7f885095ff32668ee1ef0b2efb7987e6a6 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:23:19 +0200 Subject: [PATCH 08/27] FIX php8 compatibility --- htdocs/accountancy/bookkeeping/listbyaccount.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index bb864fc39e3..0bd1c06aab8 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -187,7 +187,7 @@ if ($search_date_end && empty($search_date_endyear)) { $search_date_endday = $tmparray['mday']; } -if (empty($conf->accounting->enabled)) { +if (!isModEnabled('accounting')) { accessforbidden(); } if ($user->socid > 0) { From e54f535351fb89a2f1dc91de88a48eaa0dc32032 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:30:44 +0200 Subject: [PATCH 09/27] FIX php8 compatibility --- htdocs/accountancy/class/accountingjournal.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index c8948b05012..9720399fb5e 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -429,7 +429,7 @@ class AccountingJournal extends CommonObject { global $conf, $langs; - if (empty($conf->asset->enabled)) { + if (!isModEnabled('asset')) { return array(); } @@ -867,7 +867,7 @@ class AccountingJournal extends CommonObject } } // - // if (!$error_for_line && !empty($conf->asset->enabled) && $this->nature == 1 && $bookkeeping->fk_doc > 0) { + // if (!$error_for_line && isModEnabled('asset') && $this->nature == 1 && $bookkeeping->fk_doc > 0) { // // Set last cumulative depreciation // require_once DOL_DOCUMENT_ROOT . '/asset/class/asset.class.php'; // $asset = new Asset($this->db); From da1c41f0d191de8f48f3b857654a9b57b037b3df Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:31:48 +0200 Subject: [PATCH 10/27] FIX php8 compatibility --- htdocs/accountancy/closure/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php index 999e2ce5bd1..c4b5540fcc8 100644 --- a/htdocs/accountancy/closure/index.php +++ b/htdocs/accountancy/closure/index.php @@ -57,7 +57,7 @@ $search_date_end = dol_get_last_day($year_end, $month_end); $year_current = $year_start; // Security check -if (empty($conf->accounting->enabled)) { +if (!isModEnabled('accounting')) { accessforbidden(); } if ($user->socid > 0) { From c04824b1540c42c57dd73e19f474cda8e1cd86f7 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:32:20 +0200 Subject: [PATCH 11/27] FIX php8 compatibility --- htdocs/accountancy/customer/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index 296d6729301..0b3435ecb92 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -38,7 +38,7 @@ $codeventil = GETPOST('codeventil', 'int'); $id = GETPOST('id', 'int'); // Security check -if (empty($conf->accounting->enabled)) { +if (!isModEnabled('accounting')) { accessforbidden(); } if ($user->socid > 0) { From 29f327c7bfa98b5a1d952d6fa4155112999a33fc Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:33:31 +0200 Subject: [PATCH 12/27] FIX php8 compatibility --- htdocs/accountancy/customer/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index 0eca61c72c1..06db5cedd0e 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -40,7 +40,7 @@ $validatemonth = GETPOST('validatemonth', 'int'); $validateyear = GETPOST('validateyear', 'int'); // Security check -if (empty($conf->accounting->enabled)) { +if (!isModEnabled('accounting')) { accessforbidden(); } if ($user->socid > 0) { @@ -77,7 +77,7 @@ $action = GETPOST('action', 'aZ09'); $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) { @@ -622,7 +622,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) { // This part of code looks strange print ''; - if (!empty($conf->margin->enabled)) { + if (isModEnabled('margin')) { print "
\n"; print '
'; print ''; From 92ba7e34106aa10b90545a1b7c8ee83e684356a0 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:34:08 +0200 Subject: [PATCH 13/27] FIX php8 compatibility --- htdocs/accountancy/customer/lines.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 4a8080ab8b4..469f29ad3c7 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/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) { From 6fdd932f2bbd4919775f5af70a311dfb5e88ca65 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:34:34 +0200 Subject: [PATCH 14/27] FIX php8 compatibility --- htdocs/accountancy/customer/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index b2a127e86a4..4038bb4b5bc 100644 --- a/htdocs/accountancy/customer/list.php +++ b/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) { From 2d2d41b7d822b16dda8ba40fdd22ec2d9dd22f0d Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:35:05 +0200 Subject: [PATCH 15/27] FIX php8 compatibility --- htdocs/accountancy/expensereport/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/expensereport/card.php b/htdocs/accountancy/expensereport/card.php index 7c2310ccce4..0255e019138 100644 --- a/htdocs/accountancy/expensereport/card.php +++ b/htdocs/accountancy/expensereport/card.php @@ -42,7 +42,7 @@ $codeventil = GETPOST('codeventil', 'int'); $id = GETPOST('id', 'int'); // Security check -if (empty($conf->accounting->enabled)) { +if (!isModEnabled('accounting')) { accessforbidden(); } if ($user->socid > 0) { From 693ceb714e108694b5f29b9101b73be1e06b5385 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:35:32 +0200 Subject: [PATCH 16/27] FIX php8 compatibility --- htdocs/accountancy/expensereport/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/expensereport/index.php b/htdocs/accountancy/expensereport/index.php index 08657fe7a62..d0b25bdffd2 100644 --- a/htdocs/accountancy/expensereport/index.php +++ b/htdocs/accountancy/expensereport/index.php @@ -58,7 +58,7 @@ $year_current = $year_start; $action = GETPOST('action', 'aZ09'); // Security check -if (empty($conf->accounting->enabled)) { +if (!isModEnabled('accounting')) { accessforbidden(); } if ($user->socid > 0) { From 01d0fa609b85fd8a5188de5805f8b7ead7879c16 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:35:57 +0200 Subject: [PATCH 17/27] FIX php8 compatibility --- htdocs/accountancy/expensereport/lines.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index 005783ed7a8..926d03f9235 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -79,7 +79,7 @@ if (!$sortorder) { } // Security check -if (empty($conf->accounting->enabled)) { +if (!isModEnabled('accounting')) { accessforbidden(); } if ($user->socid > 0) { From e89d66e3f2261f3af382ebf01ce5aedcd930577b Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:36:31 +0200 Subject: [PATCH 18/27] FIX php8 compatibility --- htdocs/accountancy/expensereport/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index 880af769183..7a02d0b4564 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -97,7 +97,7 @@ $accounting = 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) { From 5a85a70139510d2cdf5dd8066164a47870aeaf95 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:37:04 +0200 Subject: [PATCH 19/27] FIX php8 compatibility --- htdocs/accountancy/journal/bankjournal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 27ffb681ae0..f3049206389 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -83,7 +83,7 @@ $now = dol_now(); $action = GETPOST('action', 'aZ09'); // Security check -if (empty($conf->accounting->enabled)) { +if (!isModEnabled('accounting')) { accessforbidden(); } if ($user->socid > 0) { From 476b383a07b990a24811fd71f2e29f4f2922162c Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:37:35 +0200 Subject: [PATCH 20/27] FIX php8 compatibility --- htdocs/accountancy/journal/expensereportsjournal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index dbd1c892086..d38e49c390e 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -58,7 +58,7 @@ if ($in_bookkeeping == '') { $now = dol_now(); // Security check -if (empty($conf->accounting->enabled)) { +if (!isModEnabled('accounting')) { accessforbidden(); } if ($user->socid > 0) { From 6cbcbad6ee0f5e2affdbc0813f5b5edeb67f6bd7 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:38:00 +0200 Subject: [PATCH 21/27] FIX php8 compatibility --- htdocs/accountancy/journal/purchasesjournal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index e4c292d2670..70741aca5d1 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -61,7 +61,7 @@ $hookmanager->initHooks(array('purchasesjournal')); $parameters = array(); // Security check -if (empty($conf->accounting->enabled)) { +if (!isModEnabled('accounting')) { accessforbidden(); } if ($user->socid > 0) { From ff4967695bbbd944a075ae722389fa77e694cd95 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:38:29 +0200 Subject: [PATCH 22/27] FIX php8 compatibility --- htdocs/accountancy/journal/sellsjournal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 599eeb627b5..107dda05f4a 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -63,7 +63,7 @@ $hookmanager->initHooks(array('sellsjournal')); $parameters = array(); // Security check -if (empty($conf->accounting->enabled)) { +if (!isModEnabled('accounting')) { accessforbidden(); } if ($user->socid > 0) { From dc1ece2c14594b3f2fe0016b6a6cd0b0d14289c7 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:38:51 +0200 Subject: [PATCH 23/27] FIX php8 compatibility --- htdocs/accountancy/journal/variousjournal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/journal/variousjournal.php b/htdocs/accountancy/journal/variousjournal.php index af32b85d8fa..d737925f2c3 100644 --- a/htdocs/accountancy/journal/variousjournal.php +++ b/htdocs/accountancy/journal/variousjournal.php @@ -83,7 +83,7 @@ if (!is_array($journal_data)) { } // Security check -if (empty($conf->accounting->enabled)) { +if (!isModEnabled('accounting')) { accessforbidden(); } if ($user->socid > 0) { From 3d28118ec85f2c0db3fa6c3908d157ca099cabd8 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:39:18 +0200 Subject: [PATCH 24/27] FIX php8 compatibility --- htdocs/accountancy/supplier/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/supplier/card.php b/htdocs/accountancy/supplier/card.php index 05d32d0cec5..306b88d11ea 100644 --- a/htdocs/accountancy/supplier/card.php +++ b/htdocs/accountancy/supplier/card.php @@ -42,7 +42,7 @@ $codeventil = GETPOST('codeventil', 'int'); $id = GETPOST('id', 'int'); // Security check -if (empty($conf->accounting->enabled)) { +if (!isModEnabled('accounting')) { accessforbidden(); } if ($user->socid > 0) { From ba73364df555901c0bc30cac3db25db3ac7ca1ca Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:39:44 +0200 Subject: [PATCH 25/27] FIX php8 compatibility --- htdocs/accountancy/supplier/lines.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index c142361155d..1edbe83eefb 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -89,7 +89,7 @@ if (!$sortorder) { $formaccounting = new FormAccounting($db); // Security check -if (empty($conf->accounting->enabled)) { +if (!isModEnabled('accounting')) { accessforbidden(); } if ($user->socid > 0) { From 0c656891b10fcff05b6fabede69cec90f34086c9 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:40:14 +0200 Subject: [PATCH 26/27] FIX php8 compatibility --- htdocs/accountancy/supplier/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index f274a5432dc..d14beb84cc2 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -106,7 +106,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) { From 692939288ce3ac1f37693b64d75757f48f58c4ad Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 17 Aug 2022 22:40:56 +0200 Subject: [PATCH 27/27] FIX php8 compatibility --- htdocs/adherents/agenda.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index 5aeb3a281cf..204ba1b8f20 100644 --- a/htdocs/adherents/agenda.php +++ b/htdocs/adherents/agenda.php @@ -130,7 +130,7 @@ if ($object->id > 0) { llxHeader("", $title, $help_url); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = member_prepare_head($object);