// Fix smarty cache after modules translation update
This commit is contained in:
@@ -801,6 +801,8 @@ class LanguageCore extends ObjectModel
|
||||
$files_list = $gz->listContent();
|
||||
if (!$gz->extract(_PS_TRANSLATIONS_DIR_.'../', false))
|
||||
$errors[] = Tools::displayError('Cannot decompress the translation file for the following language: ').(string)$iso;
|
||||
// Clear smarty modules cache
|
||||
Tools::clearCache();
|
||||
if (!Language::checkAndAddLanguage((string)$iso, $lang_pack, false, $params))
|
||||
$errors[] = Tools::displayError('An error occurred while creating the language: ').(string)$iso;
|
||||
else
|
||||
|
||||
+1
-1
@@ -2117,7 +2117,7 @@ exit;
|
||||
*
|
||||
* @param Smarty $smarty
|
||||
*/
|
||||
public static function clearCache($smarty, $tpl = false, $cache_id = null, $compile_id = null)
|
||||
public static function clearCache($smarty = null, $tpl = false, $cache_id = null, $compile_id = null)
|
||||
{
|
||||
if (is_null($smarty))
|
||||
$smarty = Context::getContext()->smarty;
|
||||
|
||||
Reference in New Issue
Block a user