From 135d535e21b30ccb213b7470c5995a8853690dfd Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 11:59:14 +0200 Subject: [PATCH 01/31] update code toward php8 --- htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php b/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php index 1e289930cf0..796d7b4c0c3 100644 --- a/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php +++ b/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php @@ -1170,8 +1170,7 @@ class pdf_standard_asset extends ModelePDFAsset */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'INVOICE_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } From 68dc522af5bce45b4411d1a06675bf80404ce3a1 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:01:07 +0200 Subject: [PATCH 02/31] update code toward php8 --- htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index e09fef45bf0..27d049c6deb 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -654,9 +654,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { // phpcs:enable - global $conf; - - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'PAYMENTORDER_FREE_TEXT', null, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } From c32bc3e7d21b80ffb2d8ef14ebcf926b2fbb0a05 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:02:08 +0200 Subject: [PATCH 03/31] update code toward php8 --- htdocs/core/modules/cheque/doc/pdf_blochet.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php index f32b2306624..a15d1ddb3ec 100644 --- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php @@ -407,7 +407,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts { global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); // Line of free text $substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object); From c45a1115c1ec6f0bc43240d8895ac95d1b9f3bd6 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:02:43 +0200 Subject: [PATCH 04/31] update code toward php8 --- htdocs/core/modules/commande/doc/pdf_einstein.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index ca8d5bd2a74..e071c387b84 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -1535,8 +1535,7 @@ class pdf_einstein extends ModelePDFCommandes protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { // phpcs:enable - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } } From 465d2a19752275d59f5725086137a82345a3e4a8 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:03:12 +0200 Subject: [PATCH 05/31] update code toward php8 --- htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 77854c9d091..d4728c08398 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -1720,8 +1720,7 @@ class pdf_eratosthene extends ModelePDFCommandes protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { // phpcs:enable - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } From 4f9cf8373037e899371ea857418f1cc20a3d3a98 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:03:36 +0200 Subject: [PATCH 06/31] update code toward php8 --- htdocs/core/modules/contract/doc/pdf_strato.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index c395b51df7e..8fb21a0d69d 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -783,8 +783,7 @@ class pdf_strato extends ModelePDFContract */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'CONTRACT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } From e2a21da4d3b224142a804e832b1300f353327389 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:04:02 +0200 Subject: [PATCH 07/31] update code toward php8 --- htdocs/core/modules/delivery/doc/pdf_storm.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php index fe8ca423a2b..2a8c9a13839 100644 --- a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php +++ b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php @@ -921,8 +921,7 @@ class pdf_storm extends ModelePDFDeliveryOrder */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'DELIVERY_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } From cd13fdd369e6389bb2ec8159afbf7c0064c75feb Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:04:42 +0200 Subject: [PATCH 08/31] update code toward php8 --- htdocs/core/modules/delivery/doc/pdf_typhon.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php index 0f0657f1e60..3bde8c8f335 100644 --- a/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php @@ -920,8 +920,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'DELIVERY_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } From 0494cec21e7edf52d5df14c6166e350c86735e03 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:05:15 +0200 Subject: [PATCH 09/31] update code toward php8 --- htdocs/core/modules/expedition/doc/pdf_espadon.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index c08beade8ec..b90b5625472 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -1197,8 +1197,7 @@ class pdf_espadon extends ModelePdfExpedition */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'SHIPPING_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } From 46ac0b98c4c6e8b3e3c0b606f5a92ce7385b5c14 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:06:01 +0200 Subject: [PATCH 10/31] update code toward php8 --- htdocs/core/modules/expedition/doc/pdf_rouget.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index c51dfd374a5..2831deb0a07 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -1142,8 +1142,7 @@ class pdf_rouget extends ModelePdfExpedition */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'SHIPPING_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } } From 08e2f91387a0c50494b81b9ad1252be53513c563 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:06:30 +0200 Subject: [PATCH 11/31] update code toward php8 --- htdocs/core/modules/expensereport/doc/pdf_standard.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index 411bc009b8e..670e92aea74 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -1129,8 +1129,7 @@ class pdf_standard extends ModeleExpenseReport */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'EXPENSEREPORT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } From a5d78fbd75ad754bfc03d8b7460811b4afa05cce Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:06:58 +0200 Subject: [PATCH 12/31] update code toward php8 --- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 39fa07c638a..c6a52489378 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -2062,8 +2062,7 @@ class pdf_crabe extends ModelePDFFactures */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'INVOICE_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } } From 019ed455202bfaa873db7b07ecf78abd4473c1dd Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:07:25 +0200 Subject: [PATCH 13/31] update code toward php8 --- htdocs/core/modules/facture/doc/pdf_sponge.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 94b6011b817..88d0112310d 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -2328,8 +2328,7 @@ class pdf_sponge extends ModelePDFFactures */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'INVOICE_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } From b4ea0631519dcf7faf67dce6e0814d969a690c68 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:07:50 +0200 Subject: [PATCH 14/31] update code toward php8 --- htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 097870e21bc..dc834ee639c 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -741,8 +741,7 @@ class pdf_soleil extends ModelePDFFicheinter */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'FICHINTER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } } From 3465a8c59b83109462c68d78d377a094ddca0beb Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:08:16 +0200 Subject: [PATCH 15/31] update code toward php8 --- htdocs/core/modules/movement/doc/pdf_standard.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/movement/doc/pdf_standard.modules.php b/htdocs/core/modules/movement/doc/pdf_standard.modules.php index 596a29c1e2d..d94932844f9 100644 --- a/htdocs/core/modules/movement/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/movement/doc/pdf_standard.modules.php @@ -1160,8 +1160,7 @@ class pdf_standard extends ModelePDFMovement */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'PRODUCT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } From 22a3419ccd395f269fcc5f65834897c094603bae Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:08:38 +0200 Subject: [PATCH 16/31] update code toward php8 --- htdocs/core/modules/mrp/doc/pdf_vinci.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php index 20fd7b0472b..6a36317ee80 100644 --- a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php +++ b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php @@ -1353,8 +1353,7 @@ class pdf_vinci extends ModelePDFMo */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'SUPPLIER_ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } From 6c785e04bbea5a19b34be02e603a668fdf133628 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:09:07 +0200 Subject: [PATCH 17/31] update code toward php8 --- htdocs/core/modules/product/doc/pdf_standard.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index df1122a5748..56f4c471f63 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -816,8 +816,7 @@ class pdf_standard extends ModelePDFProduct */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'PRODUCT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } From e2769d3302f41fe42c6e6ed3aca4aa1ef16f1d87 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:09:36 +0200 Subject: [PATCH 18/31] update code toward php8 --- htdocs/core/modules/project/doc/pdf_baleine.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php index 876249ba228..b630c68dab8 100644 --- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php @@ -695,8 +695,7 @@ class pdf_baleine extends ModelePDFProjects */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'PROJECT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } From 943f9621e111fa1d38829bd83761a6382994ed14 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:10:00 +0200 Subject: [PATCH 19/31] update code toward php8 --- htdocs/core/modules/project/doc/pdf_beluga.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index c3e673abf25..3977c620823 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -895,8 +895,7 @@ class pdf_beluga extends ModelePDFProjects */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'PROJECT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } From ff953cdf4347d202d8905640d879713d8cc8b609 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:10:23 +0200 Subject: [PATCH 20/31] update code toward php8 --- htdocs/core/modules/project/doc/pdf_timespent.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php index 02f728b5208..16e425d8604 100644 --- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php +++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php @@ -691,8 +691,7 @@ class pdf_timespent extends ModelePDFProjects */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'PROJECT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } From 0e8aece27804de88fbacdf5d78cb1283d3e24189 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:10:54 +0200 Subject: [PATCH 21/31] update code toward php8 --- htdocs/core/modules/propale/doc/pdf_azur.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 026bc1ba57e..37569be4b6a 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -1731,8 +1731,7 @@ class pdf_azur extends ModelePDFPropales */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'PROPOSAL_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } From 2948ecc863d91ac88da2577a6111510ea07d0e7e Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:11:24 +0200 Subject: [PATCH 22/31] update code toward php8 --- htdocs/core/modules/propale/doc/pdf_cyan.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index d2aa3cf5390..d2d019b01f0 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -1819,8 +1819,7 @@ class pdf_cyan extends ModelePDFPropales */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'PROPOSAL_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } From a7ae62e0b725d722094475140a756a3b9f419870 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:11:50 +0200 Subject: [PATCH 23/31] update code toward php8 --- htdocs/core/modules/reception/doc/pdf_squille.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php index fb0e59fcb3a..c6d0483d2ce 100644 --- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php +++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php @@ -1078,8 +1078,7 @@ class pdf_squille extends ModelePdfReception */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'RECEPTION_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } } From 0629dc05fc5450a0eb5a96f558de886ea822f926 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:13:32 +0200 Subject: [PATCH 24/31] update code toward php8 --- htdocs/core/modules/stock/doc/pdf_standard.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index c61fb5a5ff3..bd08a85b1c9 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -891,8 +891,7 @@ class pdf_standard extends ModelePDFStock */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'PRODUCT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } From ca133aeebe711f7e35a2aaa4873942cfad56f9f2 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:14:00 +0200 Subject: [PATCH 25/31] update code toward php8 --- .../modules/stocktransfer/doc/pdf_eagle_proforma.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php index 8be1b5e0d9c..78448345191 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php @@ -1432,8 +1432,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { // phpcs:enable - global $conf; - $showdetails = $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } From a51c63a65f0b436bdd9901c7d962731c3aa3377d Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:14:28 +0200 Subject: [PATCH 26/31] update code toward php8 --- htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php index d658ee77069..755f2e2edd9 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php @@ -1167,8 +1167,7 @@ class pdf_eagle extends ModelePdfStockTransfer protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { // phpcs:enable - global $conf; - $showdetails = $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'SHIPPING_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } From 22d0df5ca466925d7b44cda532a973660188c4c0 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:14:55 +0200 Subject: [PATCH 27/31] update code toward php8 --- .../core/modules/supplier_invoice/doc/pdf_canelle.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php index dba1c61c7e9..218d02dd4ba 100644 --- a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php @@ -1295,8 +1295,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'SUPPLIER_INVOICE_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } From 5eb3a60726a5ce05385001f789b6cdf1477f797e Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:15:17 +0200 Subject: [PATCH 28/31] update code toward php8 --- htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php index 3b12747c924..fb36f5e05b9 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php @@ -1484,8 +1484,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'SUPPLIER_ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } From 211a38838e73a1879bc5f873764fe009c4c180cf Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:15:42 +0200 Subject: [PATCH 29/31] update code toward php8 --- .../core/modules/supplier_order/doc/pdf_muscadet.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php index 2ba9ae7f1ae..59eda7b9fdd 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php @@ -1392,8 +1392,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'SUPPLIER_ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } From 1a028a99530cd69bedd6204fbff26e2a52fcf76c Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:16:08 +0200 Subject: [PATCH 30/31] update code toward php8 --- .../core/modules/supplier_payment/doc/pdf_standard.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php index 8b131c4e0f2..c220fcb08ab 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -824,8 +824,7 @@ class pdf_standard extends ModelePDFSuppliersPayments */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'SUPPLIER_INVOICE_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } From 43dfb1dff08872765b04ea2a7191a7591a7723d6 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 29 Sep 2022 12:16:32 +0200 Subject: [PATCH 31/31] update code toward php8 --- .../core/modules/supplier_proposal/doc/pdf_aurore.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index 041a10c2f6d..4d2c121cd62 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -1443,8 +1443,7 @@ class pdf_aurore extends ModelePDFSupplierProposal */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'SUPPLIER_PROPOSAL_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } }