diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index 3c1c70f1604..bc938accc92 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -274,7 +274,7 @@ class pdf_strato extends ModelePDFContract $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); // Display notes if (!empty($object->note_public)) { @@ -390,7 +390,7 @@ class pdf_strato extends ModelePDFContract 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); diff --git a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php index 1d5a3831622..735b247f73a 100644 --- a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php +++ b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php @@ -343,7 +343,7 @@ class pdf_storm extends ModelePDFDeliveryOrder $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; @@ -445,7 +445,7 @@ class pdf_storm extends ModelePDFDeliveryOrder 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; @@ -485,7 +485,7 @@ class pdf_storm extends ModelePDFDeliveryOrder 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); @@ -571,7 +571,7 @@ class pdf_storm extends ModelePDFDeliveryOrder $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)) { @@ -591,7 +591,7 @@ class pdf_storm extends ModelePDFDeliveryOrder $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } }