From 4e83087e281cc7ab4174092b3dae5b642cd8f2ac Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Wed, 17 Sep 2025 15:04:01 +0200 Subject: [PATCH] Fix complete #35368 --- htdocs/core/modules/accountancy/doc/pdf_balance.modules.php | 2 ++ htdocs/core/modules/accountancy/doc/pdf_bookkeeping.modules.php | 2 ++ htdocs/core/modules/accountancy/doc/pdf_ledger.modules.php | 2 ++ htdocs/core/modules/action/doc/pdf_standard_actions.class.php | 2 ++ htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php | 2 ++ htdocs/core/modules/bank/doc/pdf_ban.modules.php | 2 ++ htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php | 2 ++ htdocs/core/modules/cheque/doc/pdf_blochet.class.php | 2 ++ htdocs/core/modules/commande/doc/pdf_einstein.modules.php | 2 ++ htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php | 2 ++ htdocs/core/modules/contract/doc/pdf_strato.modules.php | 2 ++ htdocs/core/modules/delivery/doc/pdf_storm.modules.php | 2 ++ htdocs/core/modules/delivery/doc/pdf_typhon.modules.php | 2 ++ htdocs/core/modules/expedition/doc/pdf_espadon.modules.php | 2 ++ htdocs/core/modules/expedition/doc/pdf_merou.modules.php | 2 ++ htdocs/core/modules/expedition/doc/pdf_rouget.modules.php | 2 ++ .../expensereport/doc/pdf_standard_expensereport.modules.php | 2 ++ htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 2 ++ htdocs/core/modules/facture/doc/pdf_octopus.modules.php | 2 ++ htdocs/core/modules/facture/doc/pdf_sponge.modules.php | 2 ++ htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php | 2 ++ htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php | 2 ++ .../modules/movement/doc/pdf_standard_movementstock.modules.php | 2 ++ htdocs/core/modules/mrp/doc/pdf_vinci.modules.php | 2 ++ htdocs/core/modules/product/doc/pdf_standard.modules.php | 2 ++ htdocs/core/modules/project/doc/pdf_baleine.modules.php | 2 ++ htdocs/core/modules/project/doc/pdf_beluga.modules.php | 2 ++ htdocs/core/modules/project/doc/pdf_timespent.modules.php | 2 ++ htdocs/core/modules/propale/doc/pdf_azur.modules.php | 2 ++ htdocs/core/modules/propale/doc/pdf_cyan.modules.php | 2 ++ htdocs/core/modules/rapport/pdf_paiement.class.php | 2 ++ htdocs/core/modules/reception/doc/pdf_squille.modules.php | 2 ++ htdocs/core/modules/stock/doc/pdf_standard_stock.modules.php | 2 ++ htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php | 2 ++ .../modules/stocktransfer/doc/pdf_eagle_proforma.modules.php | 2 ++ .../core/modules/supplier_invoice/doc/pdf_canelle.modules.php | 2 ++ htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php | 2 ++ htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php | 2 ++ .../doc/pdf_standard_supplierpayment.modules.php | 2 ++ .../core/modules/supplier_proposal/doc/pdf_aurore.modules.php | 2 ++ .../core/modules/supplier_proposal/doc/pdf_zenith.modules.php | 2 ++ .../core/modules/mymodule/doc/pdf_standard_myobject.modules.php | 2 ++ .../doc/pdf_standard_recruitmentjobposition.modules.php | 2 ++ 43 files changed, 86 insertions(+) diff --git a/htdocs/core/modules/accountancy/doc/pdf_balance.modules.php b/htdocs/core/modules/accountancy/doc/pdf_balance.modules.php index 247e7c7fccf..1e47930f139 100644 --- a/htdocs/core/modules/accountancy/doc/pdf_balance.modules.php +++ b/htdocs/core/modules/accountancy/doc/pdf_balance.modules.php @@ -537,6 +537,8 @@ class pdf_balance extends ModelePdfAccountancy if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/accountancy/doc/pdf_bookkeeping.modules.php b/htdocs/core/modules/accountancy/doc/pdf_bookkeeping.modules.php index acca0670854..466eaa115a1 100644 --- a/htdocs/core/modules/accountancy/doc/pdf_bookkeeping.modules.php +++ b/htdocs/core/modules/accountancy/doc/pdf_bookkeeping.modules.php @@ -544,6 +544,8 @@ class pdf_bookkeeping extends ModelePdfAccountancy if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/accountancy/doc/pdf_ledger.modules.php b/htdocs/core/modules/accountancy/doc/pdf_ledger.modules.php index fde39756e2e..ec15d5a6e08 100644 --- a/htdocs/core/modules/accountancy/doc/pdf_ledger.modules.php +++ b/htdocs/core/modules/accountancy/doc/pdf_ledger.modules.php @@ -545,6 +545,8 @@ class pdf_ledger extends ModelePdfAccountancy if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/action/doc/pdf_standard_actions.class.php b/htdocs/core/modules/action/doc/pdf_standard_actions.class.php index 3cccf3e808f..b96d19411c0 100644 --- a/htdocs/core/modules/action/doc/pdf_standard_actions.class.php +++ b/htdocs/core/modules/action/doc/pdf_standard_actions.class.php @@ -263,6 +263,8 @@ class pdf_standard_actions if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php b/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php index 41db3197f09..401f1a12ed6 100644 --- a/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php +++ b/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php @@ -698,6 +698,8 @@ class pdf_standard_asset extends ModelePDFAsset if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index f84c3745f1f..31c56d5e330 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -261,6 +261,8 @@ class pdf_ban extends ModeleBankAccountDoc if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index a2a4149babd..2be23d86135 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -462,6 +462,8 @@ class pdf_sepamandate extends ModeleBankAccountDoc if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php index c2130e551a5..5d1f6fe5b6d 100644 --- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php @@ -230,6 +230,8 @@ class BordereauChequeBlochet extends ModeleChequeReceipts if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 39e8d75975b..84fc83f3d02 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -674,6 +674,8 @@ class pdf_einstein extends ModelePDFCommandes if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index a3155e4e6ce..75e1fedac80 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -960,6 +960,8 @@ class pdf_eratosthene extends ModelePDFCommandes if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index 9298e1f1b1e..7150763cbd1 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -502,6 +502,8 @@ class pdf_strato extends ModelePDFContract if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php index 95f2ff91f2f..694b0eb27c7 100644 --- a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php +++ b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php @@ -584,6 +584,8 @@ class pdf_storm extends ModelePDFDeliveryOrder if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php index df28bf780d9..1fc3bc1a6a8 100644 --- a/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php @@ -585,6 +585,8 @@ class pdf_typhon extends ModelePDFDeliveryOrder if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 230ed544712..b8f713dbd62 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -852,6 +852,8 @@ class pdf_espadon extends ModelePdfExpedition if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index ee2be101c05..2af0b39896b 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -404,6 +404,8 @@ class pdf_merou extends ModelePdfExpedition if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index 2c21c7cdee9..e051869f3c8 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -692,6 +692,8 @@ class pdf_rouget extends ModelePdfExpedition if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php index 01d4282d6fd..a2608321500 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php @@ -548,6 +548,8 @@ class pdf_standard_expensereport extends ModeleExpenseReport if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 5ef342975a7..c77b286517d 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -919,6 +919,8 @@ class pdf_crabe extends ModelePDFFactures if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/facture/doc/pdf_octopus.modules.php b/htdocs/core/modules/facture/doc/pdf_octopus.modules.php index 7ec25f51722..fed4e211fa2 100644 --- a/htdocs/core/modules/facture/doc/pdf_octopus.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_octopus.modules.php @@ -1147,6 +1147,8 @@ class pdf_octopus extends ModelePDFFactures if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index c33005b7f56..099eb5d3d94 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -1142,6 +1142,8 @@ class pdf_sponge extends ModelePDFFactures if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index ce3218dd7af..1515925f96e 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -430,6 +430,8 @@ class pdf_soleil extends ModelePDFFicheinter if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php b/htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php index 9ab6c30daab..95da7bee0a8 100644 --- a/htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php +++ b/htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php @@ -469,6 +469,8 @@ class pdf_standard_evaluation extends ModelePDFEvaluation if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php b/htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php index ba7f192040d..58863e8a657 100644 --- a/htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php +++ b/htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php @@ -797,6 +797,8 @@ class pdf_standard_movementstock extends ModelePDFMovement if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php index f8ddcf7ee25..2b7205c1b62 100644 --- a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php +++ b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php @@ -607,6 +607,8 @@ class pdf_vinci extends ModelePDFMo if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index 93915657472..413bfb7cb5c 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -591,6 +591,8 @@ class pdf_standard extends ModelePDFProduct if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php index 8762c0605d2..dbbc1c702f1 100644 --- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php @@ -492,6 +492,8 @@ class pdf_baleine extends ModelePDFProjects if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index 5b631cb0641..76effdc4297 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -747,6 +747,8 @@ class pdf_beluga extends ModelePDFProjects if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php index 32f3f88c9c6..86ae46a4b7c 100644 --- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php +++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php @@ -490,6 +490,8 @@ class pdf_timespent extends ModelePDFProjects if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 0380ac41f56..2434f07a908 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -876,6 +876,8 @@ class pdf_azur extends ModelePDFPropales if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 8c9ed631ce1..dd9e78421ab 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -1063,6 +1063,8 @@ class pdf_cyan extends ModelePDFPropales if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php index 0d80927958d..053f9995b6d 100644 --- a/htdocs/core/modules/rapport/pdf_paiement.class.php +++ b/htdocs/core/modules/rapport/pdf_paiement.class.php @@ -410,6 +410,8 @@ class pdf_paiement extends CommonDocGenerator if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php index b8af028b51a..ccf9ec0d249 100644 --- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php +++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php @@ -663,6 +663,8 @@ class pdf_squille extends ModelePdfReception if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/stock/doc/pdf_standard_stock.modules.php b/htdocs/core/modules/stock/doc/pdf_standard_stock.modules.php index b12a706d31b..82ed75d83b4 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard_stock.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard_stock.modules.php @@ -593,6 +593,8 @@ class pdf_standard_stock extends ModelePDFStock if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php index c34fc1488c6..0dc3ec4070d 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php @@ -751,6 +751,8 @@ class pdf_eagle extends ModelePDFStockTransfer if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php index 82c614671af..24e48bc116a 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php @@ -823,6 +823,8 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php index 60ec67f2e92..4df50eae7bd 100644 --- a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php @@ -593,6 +593,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); 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 4fa1768da19..2e778907ddf 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php @@ -830,6 +830,8 @@ class pdf_cornas extends ModelePDFSuppliersOrders if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); 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 ca1832c3360..3c354ebbf7c 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php @@ -690,6 +690,8 @@ class pdf_muscadet extends ModelePDFSuppliersOrders if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php index 3b0cb46ba1e..0ca4b56efc1 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php @@ -493,6 +493,8 @@ class pdf_standard_supplierpayment extends ModelePDFSuppliersPayments if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); 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 cb78220cd56..8c85be04347 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -679,6 +679,8 @@ class pdf_aurore extends ModelePDFSupplierProposal if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); 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 985746d1f94..df706b4a03c 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php @@ -809,6 +809,8 @@ class pdf_zenith extends ModelePDFSupplierProposal if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php index 354a569213c..fd78205ec22 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php @@ -820,6 +820,8 @@ class pdf_standard_myobject extends ModelePDFMyObject if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file); diff --git a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php index ad20b5c74b8..46312af0ae3 100644 --- a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php +++ b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php @@ -631,6 +631,8 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; + dolChmod($file); + return -1; } dolChmod($file);