// Small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17701 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -314,12 +314,19 @@ class LocalizationPackCore
|
||||
if (file_put_contents($file, $content))
|
||||
{
|
||||
$gz = new Archive_Tar($file, true);
|
||||
$files_list = $gz->listContent();
|
||||
|
||||
if (!$gz->extract(_PS_TRANSLATIONS_DIR_.'../', false))
|
||||
{
|
||||
$this->_errors[] = Tools::displayError('Cannot decompress the translation file for the following language: ').(string)$attributes['iso_code'];
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$translations = new AdminTranslationsController();
|
||||
$translations->checkAndAddMailsFiles($attributes['iso_code'], $files_list);
|
||||
$translations->addNewTabs($attributes['iso_code'], $files_list);
|
||||
}
|
||||
|
||||
if (!Language::checkAndAddLanguage((string)$attributes['iso_code']))
|
||||
{
|
||||
|
||||
@@ -615,6 +615,7 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
if ($gz->extract(_PS_TRANSLATIONS_DIR_.'../', false))
|
||||
{
|
||||
$this->checkAndAddMailsFiles($arr_import_lang[0], $files_list);
|
||||
$this->addNewTabs($arr_import_lang[0], $files_list);
|
||||
if (!Language::checkAndAddLanguage($arr_import_lang[0]))
|
||||
$conf = 20;
|
||||
if (!unlink($file))
|
||||
|
||||
Reference in New Issue
Block a user