Standardize substition keys.

This commit is contained in:
Laurent Destailleur
2017-10-13 10:35:21 +02:00
parent 86f7add355
commit 2b55fb81b9
8 changed files with 31 additions and 25 deletions

View File

@@ -5511,7 +5511,9 @@ function make_substitutions($text, $substitutionarray, $outputlangs=null)
// Make substitition for array $substitutionarray
foreach ($substitutionarray as $key => $value)
{
if ($key == '__SIGNATURE__' && (! empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))) $value='';
if ($key == '__SIGNATURE__' && (! empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))) $value=''; // Protection
if ($key == '__USER_SIGNATURE__' && (! empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))) $value=''; // Protection
$text=str_replace("$key","$value",$text); // We must keep the " to work when value is 123.5 for example
}