- Fix multiple translations in a same process for different id_lang
If id_lang are mixed (1, 2, 3, 1, 4, 2...) the translations aren't correctly populated from the theme lang.php override if include_once is used. include must be used in order to handle mixed id_lang in a same process. Signed-off-by: hadjedjvincent <v.hadjedj@presta-module.com>
This commit is contained in:
committed by
hadjedjvincent
parent
2a1c991612
commit
d064be1587
+2
-2
@@ -372,11 +372,11 @@ class MailCore
|
||||
|
||||
$file_core = _PS_ROOT_DIR_.'/mails/'.$iso_code.'/lang.php';
|
||||
if (Tools::file_exists_cache($file_core) && empty($_LANGMAIL))
|
||||
include_once($file_core);
|
||||
include($file_core);
|
||||
|
||||
$file_theme = _PS_THEME_DIR_.'mails/'.$iso_code.'/lang.php';
|
||||
if (Tools::file_exists_cache($file_theme))
|
||||
include_once($file_theme);
|
||||
include($file_theme);
|
||||
|
||||
if (!is_array($_LANGMAIL))
|
||||
return (str_replace('"', '"', $string));
|
||||
|
||||
Reference in New Issue
Block a user