From f543461e9b084de70e84ba06a5ed15c4f2943394 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 May 2017 11:21:28 +0200 Subject: [PATCH] Complete the substitution array with substitution array with all possible keys --- htdocs/core/class/html.formmail.class.php | 3 +++ htdocs/core/lib/functions.lib.php | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index d7ab17e60c4..6c411b60e66 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -1133,6 +1133,9 @@ class FormMail extends Form $vars['__SECUREKEYPAYPAL_MEMBER__']=''; } } + + $vars=complete_substitutions_array($vars, $langs, null, null); + return $vars; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 857ddc6eec2..b6cf92aa81d 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4953,7 +4953,8 @@ function make_substitutions($text, $substitutionarray, $outputlangs=null) } /** - * Complete the $substitutionarray with more entries + * Complete the $substitutionarray with more entries. + * Can also add substitution keys coming from external module that had set the "substitutions=1" into module_part array. In this case, method completesubstitutionarray provided by module is called. * * @param array $substitutionarray Array substitution old value => new value value * @param Translate $outputlangs Output language