From 62c02a6b72b42a0611ee190d657fdc6627f7c730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Cendrier?= <81741011+altairis-noe@users.noreply.github.com> Date: Tue, 20 May 2025 22:12:21 +0200 Subject: [PATCH 1/4] FIX: ensure dir exists before trying to move something in it (#34211) Co-authored-by: Laurent Destailleur --- htdocs/admin/pdf_other.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/admin/pdf_other.php b/htdocs/admin/pdf_other.php index 86dbbf1d4e1..81eb77524b9 100644 --- a/htdocs/admin/pdf_other.php +++ b/htdocs/admin/pdf_other.php @@ -149,6 +149,9 @@ if ($action == 'update') { setEventMessages($langs->trans("ErrorBadFormat"), null, 'errors'); } else { $dirforterms = $conf->mycompany->dir_output.'/'; + if (!is_dir($dirforterms)) { + dol_mkdir($dirforterms); + } $original_file = $_FILES['termsofsale']["name"]; $result = dol_move_uploaded_file($_FILES['termsofsale']["tmp_name"], $dirforterms.$original_file, 1, 0, $_FILES['termsofsale']['error']); if ($result) { From 9c66aa29c65f840f485490296f2210c74ba6849b Mon Sep 17 00:00:00 2001 From: atm-irvine <165771178+atm-irvine@users.noreply.github.com> Date: Thu, 22 May 2025 15:45:20 +0200 Subject: [PATCH 2/4] fix(document): use propale instead of propal (#34248) --- htdocs/core/lib/files.lib.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index a149369ef61..cedd995d42b 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -2879,6 +2879,8 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } elseif ($modulepart == 'expedition' && strpos($original_file, 'receipt/') === 0) { // Fix modulepart delivery $modulepart = 'delivery'; + } elseif ($modulepart == 'propale') { + $modulepart = 'propal'; } //print 'dol_check_secure_access_document modulepart='.$modulepart.' original_file='.$original_file.' entity='.$entity; From 3589c35489d8ce38e31021c4351a79bd1a600a6c Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Thu, 22 May 2025 16:38:05 +0200 Subject: [PATCH 3/4] Fix productMargins.php (#34233) --- htdocs/margin/productMargins.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php index dac098bf848..ff2bd0cafd7 100644 --- a/htdocs/margin/productMargins.php +++ b/htdocs/margin/productMargins.php @@ -126,7 +126,7 @@ print ''; // Product print ''; print ''; // Categories From 30b8237a52b447d78be191d4b32a30b7aaef82d0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 22 May 2025 17:01:13 +0200 Subject: [PATCH 4/4] Fix phpunit --- test/phpunit/SecurityGETPOSTTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/phpunit/SecurityGETPOSTTest.php b/test/phpunit/SecurityGETPOSTTest.php index ec176634c4e..0cc2c9f5014 100644 --- a/test/phpunit/SecurityGETPOSTTest.php +++ b/test/phpunit/SecurityGETPOSTTest.php @@ -507,7 +507,7 @@ class SecurityGETPOSTTest extends CommonClassTest // Test that links not on wrapper and not data are disallowed $result = GETPOST("paramtestsubstit", 'alphanohtml'); print __METHOD__." result=".$result."\n"; - $this->assertEquals('XXX XXX 999 XXX 1 XXX 1 XXX', $result, 'Failed to do conversion'); + $this->assertEquals('XXX __NOTDEFINED__ XXX 999 XXX 1 XXX 1 XXX', $result, 'Failed to do conversion'); return $result;
'.$langs->trans('ProductOrService').''; -print img_picto('', 'product', 'class="pictofixedwidth"').$form->select_produits(($id > 0 ? $id : ''), 'id', '', 20, 0, 1, 2, '', 1, array(), 0, '', 0, '', 0, '', null, 1); +print img_picto('', 'product', 'class="pictofixedwidth"').$form->select_produits(($id > 0 ? $id : ''), 'id', '', 20, 0, 1, 2, '', 1, array(), 0, 1, 0, '', 0, '', null, 1); print '