update code towards php8 compliance

This commit is contained in:
Philippe GRAND 2022-10-06 10:10:38 +02:00
parent 3eb2df0647
commit 256914d0c5
2 changed files with 9 additions and 9 deletions

View File

@ -335,7 +335,7 @@ class pdf_eagle extends ModelePdfStockTransfer
$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 = 130;
$tab_height_newpage = 150;
@ -440,7 +440,7 @@ class pdf_eagle extends ModelePdfStockTransfer
if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) { // If photo too high, we moved completely on new page
$pdf->AddPage('', '', true);
if (!empty($tplidx)) $pdf->useTemplate($tplidx);
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
$pdf->setPage($pageposbefore + 1);
$curY = $tab_top_newpage;
@ -496,7 +496,7 @@ class pdf_eagle extends ModelePdfStockTransfer
if ($i == ($nblines - 1)) { // No more lines, and no space left to show total, so we create a new page
$pdf->AddPage('', '', true);
if (!empty($tplidx)) $pdf->useTemplate($tplidx);
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
$pdf->setPage($pageposafter + 1);
}
} else {
@ -612,7 +612,7 @@ class pdf_eagle extends ModelePdfStockTransfer
$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)) $this->_pagehead($pdf, $object, 0, $outputlangs);
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
}
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
if ($pagenb == 1) {
@ -625,7 +625,7 @@ class pdf_eagle extends ModelePdfStockTransfer
$pdf->AddPage();
if (!empty($tplidx)) $pdf->useTemplate($tplidx);
$pagenb++;
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
}
}

View File

@ -342,7 +342,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$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);
// Incoterm
if (isModEnabled('incoterm')) {
@ -428,7 +428,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
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);
@ -559,7 +559,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$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);
}
}
@ -576,7 +576,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->useTemplate($tplidx);
}
$pagenb++;
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
$this->_pagehead($pdf, $object, 0, $outputlangs);
}
}