Browse Source

Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop

Laurent Destailleur 4 years ago
parent
commit
329499c103

+ 1 - 0
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 *****

+ 1 - 0
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;
 	}

+ 1 - 0
htdocs/admin/company.php

@@ -236,6 +236,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
 
 	if (!$error)
 	{
+		setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
 		$db->commit();
 	} else {
 		$db->rollback();

+ 1 - 0
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;
 	}

+ 2 - 2
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";
@@ -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("Hacker<svg onload='console.log(''123'')'", $result);
+        $this->assertEquals("Hacker<svg onload='console.log(123)'", $result);
 
         $result=GETPOST("param9", 'alphanohtml');
         print __METHOD__." result=".$result."\n";