diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index cd4c68a5965..63e86ba25d5 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -727,7 +727,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetFont('', '', $default_font_size - 1); - $diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE); + $diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3); // If France, show VAT mention if not applicable if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) { @@ -740,7 +740,7 @@ class pdf_einstein extends ModelePDFCommandes $posxval = 52; - $diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE); + $diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3); // Show payments conditions if ($object->cond_reglement_code || $object->cond_reglement) { diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 10f54c67915..2de7ee85e41 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -1007,7 +1007,7 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->SetFont('', '', $default_font_size - 1); - $diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE); + $diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3); // If France, show VAT mention if not applicable if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) { @@ -1020,7 +1020,7 @@ class pdf_eratosthene extends ModelePDFCommandes $posxval = 52; - $diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE); + $diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3); // Show payments conditions if ($object->cond_reglement_code || $object->cond_reglement) { diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 978ade1f12e..c904a318a4e 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -929,7 +929,7 @@ class pdf_azur extends ModelePDFPropales $pdf->SetFont('', '', $default_font_size - 1); - $diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE); + $diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3); // If France, show VAT mention if not applicable if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) { diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 17f7abe524f..0bbc7c6e1de 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -1092,7 +1092,7 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetFont('', '', $default_font_size - 1); - $diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE); + $diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3); // If France, show VAT mention if not applicable if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) { 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 f88ea26e8ae..323c55584ea 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php @@ -881,7 +881,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders global $conf, $mysoc; $default_font_size = pdf_getPDFFontSize($outputlangs); - $diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE); + $diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3); // If France, show VAT mention if not applicable if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) { 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 1c69f02962b..2df7f792ab4 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php @@ -741,7 +741,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders global $conf, $mysoc; $default_font_size = pdf_getPDFFontSize($outputlangs); - $diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE); + $diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3); // If France, show VAT mention if not applicable if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) { 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 83c4521d5c9..b7fc37c2797 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -730,7 +730,7 @@ class pdf_aurore extends ModelePDFSupplierProposal global $conf; $default_font_size = pdf_getPDFFontSize($outputlangs); - $diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE); + $diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3); $pdf->SetFont('', '', $default_font_size - 1); diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php index 814e910b081..cf2510053ee 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php @@ -860,7 +860,7 @@ class pdf_zenith extends ModelePDFSupplierProposal global $conf, $mysoc; $default_font_size = pdf_getPDFFontSize($outputlangs); - $diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE); + $diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3); // If France, show VAT mention if not applicable if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) { diff --git a/htdocs/index.php b/htdocs/index.php index 0ac0b855707..2f61963a4d5 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2015 Marcos García - * Copyright (C) 2021-2024 Frédéric France + * Copyright (C) 2021-2025 Frédéric France * Copyright (C) 2024-2025 MDW * Copyright (C) 2024 Alexandre Spangaro * @@ -154,6 +154,7 @@ if (!getDolGlobalString('MAIN_REMOVE_INSTALL_WARNING')) { $newPerm = $currentPerm & ~0222; //print $conffile.' '.decoct($currentPerm).' '.(string) decoct($newPerm).' '.substr(decoct($newPerm), -4); dolChmod($conffile, decoct($newPerm)); + // @phpstan-ignore-next-line if (is_writable($conffile)) { $langs->load("errors");