From 61b8a697871575c5fd9c1d33aa0f2a83ab30dcb0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Jan 2021 15:40:59 +0100 Subject: [PATCH 1/4] Code comment --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 322372ab8a2..aff7be3c35e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -250,6 +250,7 @@ Following changes may create regressions for some external modules, but were nec * Function showStripePaymentUrl, getStripePaymentUrl, showPaypalPaymentUrl and getPaypalPaymentUrl has been removed. The generic one showOnlinePaymentUrl and getOnlinePaymentUrl are always used. * Context for hook showSocinfoOnPrint has been moved from "showsocinfoonprint" to "main" * Library htdocs/includes/phpoffice/phpexcel as been removed (replaced with htdocs/includes/phpoffice/PhpSpreadsheet) +* Databse transaction in your triggers must be correctly balanced (one close for one open). If not, an error will be returned by the trigger, even if trigger did return error code. ***** ChangeLog for 12.0.4 compared to 12.0.3 ***** From 16333b911a8551159a04091e034e250f503e1f56 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Jan 2021 15:57:30 +0100 Subject: [PATCH 2/4] Fix phpunit --- test/phpunit/SecurityTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/phpunit/SecurityTest.php b/test/phpunit/SecurityTest.php index d21b4bbb352..e3eabbf3432 100644 --- a/test/phpunit/SecurityTest.php +++ b/test/phpunit/SecurityTest.php @@ -337,7 +337,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase $result=GETPOST("param6", 'alpha'); print __METHOD__." result=".$result."\n"; - $this->assertEquals('\'\'>', $result); + $this->assertEquals('>', $result); $result=GETPOST("param6", 'nohtml'); print __METHOD__." result=".$result."\n"; From 871691bf69dba1ed973b74957341b93e6a967bc7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Jan 2021 16:34:49 +0100 Subject: [PATCH 3/4] Fix missing popup --- htdocs/admin/accountant.php | 1 + htdocs/admin/company.php | 1 + htdocs/admin/openinghours.php | 1 + 3 files changed, 3 insertions(+) diff --git a/htdocs/admin/accountant.php b/htdocs/admin/accountant.php index c8c082db6ae..b017230c677 100644 --- a/htdocs/admin/accountant.php +++ b/htdocs/admin/accountant.php @@ -66,6 +66,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha')) if ($action != 'updateedit' && !$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]); exit; } diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 00bd17e865f..02091124b15 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -256,6 +256,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha')) if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); $db->commit(); } else diff --git a/htdocs/admin/openinghours.php b/htdocs/admin/openinghours.php index d4886bb2a57..05e0658d1d7 100644 --- a/htdocs/admin/openinghours.php +++ b/htdocs/admin/openinghours.php @@ -57,6 +57,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha')) if ($action != 'updateedit' && !$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]); exit; } From 2cecd449cf2efb94eb5a8c84833b3b0e5986311f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Jan 2021 16:41:59 +0100 Subject: [PATCH 4/4] Fix phpcs --- test/phpunit/SecurityTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/phpunit/SecurityTest.php b/test/phpunit/SecurityTest.php index e3eabbf3432..c38cf49d018 100644 --- a/test/phpunit/SecurityTest.php +++ b/test/phpunit/SecurityTest.php @@ -351,7 +351,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase // With alphanohtml, we must convert the html entities like n $result=GETPOST("param8", 'alphanohtml'); print __METHOD__." result=".$result."\n"; - $this->assertEquals("HackerassertEquals("Hacker