From 076caa11abada04f2298d379d536f32b433e79ed Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Mon, 30 Mar 2020 10:28:20 +0200 Subject: [PATCH 1/3] Add token functions to improve modulebuilder compatiblity with maintained versions. --- htdocs/core/lib/functions.lib.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index a16faa50f46..bb015117646 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -7944,3 +7944,24 @@ function isAFileWithExecutableContent($filename) } return false; } + +/** + * Return the value of token currently saved into session with name 'newtoken'. + * This token must be send by any POST as it will be used by next page for comparison with value in session. + * + * @return string + */ +function newToken() +{ + return $_SESSION['newtoken']; +} + +/** + * Return the value of token currently saved into session with name 'token'. + * + * @return string + */ +function currentToken() +{ + return $_SESSION['token']; +} \ No newline at end of file From 3eda785ca53b1b421df8c25b508aaf1817c473d7 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Mon, 30 Mar 2020 10:36:49 +0200 Subject: [PATCH 2/3] Add newline end of file --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index bb015117646..b73d58115fb 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -7964,4 +7964,4 @@ function newToken() function currentToken() { return $_SESSION['token']; -} \ No newline at end of file +} From 64207ef58d9ed98e51122788c1008fd0615ef648 Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Mon, 30 Mar 2020 14:18:05 +0200 Subject: [PATCH 3/3] FIX missing array option --- htdocs/fourn/commande/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 829b82a6903..cb2b24badf8 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1213,7 +1213,7 @@ $result = $object->updateline( '', null, null, - array(), + $array_option, $lines[$i]->fk_unit, 0, $element,