2
0
forked from Wavyzz/dolibarr

update code towards php8 compliance

This commit is contained in:
Philippe GRAND
2022-10-06 10:03:43 +02:00
parent b03b5b9b26
commit 7d0650cb0b

View File

@@ -330,7 +330,7 @@ class pdf_espadon extends ModelePdfExpedition
$pdf->SetTextColor(0, 0, 0);
$tab_top = 90;
$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);
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
@@ -428,7 +428,7 @@ class pdf_espadon extends ModelePdfExpedition
$pdf->AddPage();
$pagenb++;
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);
// $this->_pagefoot($pdf,$object,$outputlangs,1);
$pdf->setTopMargin($tab_top_newpage);
// The only function to edit the bottom margin of current page to set it.
@@ -482,7 +482,7 @@ class pdf_espadon extends ModelePdfExpedition
// apply note frame to last page
$pdf->setPage($pageposafternote);
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);
$height_note = $posyafter - $tab_top_newpage;
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
} else // No pagebreak
@@ -500,7 +500,7 @@ class pdf_espadon extends ModelePdfExpedition
$pageposafternote++;
$pdf->setPage($pageposafternote);
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);
$posyafter = $tab_top_newpage;
}
@@ -554,7 +554,7 @@ class pdf_espadon extends ModelePdfExpedition
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;
@@ -596,7 +596,7 @@ class pdf_espadon extends ModelePdfExpedition
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 {
@@ -705,7 +705,7 @@ class pdf_espadon extends ModelePdfExpedition
$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)) {
@@ -725,7 +725,7 @@ class pdf_espadon extends ModelePdfExpedition
$pdf->useTemplate($tplidx);
}
$pagenb++;
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
$this->_pagehead($pdf, $object, 0, $outputlangs);
}
}