From a68e3676efe9e01249d78c2db0008b50dc10484d Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 6 Oct 2022 10:12:17 +0200 Subject: [PATCH] update code towards php8 compliance --- .../supplier_payment/doc/pdf_standard.modules.php | 8 ++++---- .../supplier_proposal/doc/pdf_aurore.modules.php | 10 +++++----- 2 files changed, 9 insertions(+), 9 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 ea8153e4d2a..74f90f1d68e 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -291,7 +291,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $pdf->SetTextColor(0, 0, 0); $tab_top = 90; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10); $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext; @@ -336,7 +336,7 @@ class pdf_standard extends ModelePDFSuppliersPayments if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -417,7 +417,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } if (!empty($tplidx)) { @@ -437,7 +437,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } 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 4b9a9bb538c..53ff4a1797d 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -371,7 +371,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->SetTextColor(0, 0, 0); $tab_top = 90 + $top_shift; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); // Affiche notes $notetoshow = empty($object->note_public) ? '' : $object->note_public; @@ -436,7 +436,7 @@ class pdf_aurore extends ModelePDFSupplierProposal if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposbefore + 1); @@ -486,7 +486,7 @@ class pdf_aurore extends ModelePDFSupplierProposal if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -633,7 +633,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } if (!empty($tplidx)) { @@ -653,7 +653,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } }