// Clean language pack retrieval
This commit is contained in:
1 parent
bcaa625f4c
commit
b701acc8cf
1 file changed
+2
-3
@@ -722,9 +722,8 @@ class AdminTranslationsControllerCore extends AdminController
|
|||||||
$arr_import_lang = explode('|', Tools::getValue('params_import_language')); /* 0 = Language ISO code, 1 = PS version */
|
$arr_import_lang = explode('|', Tools::getValue('params_import_language')); /* 0 = Language ISO code, 1 = PS version */
|
||||||
if (Validate::isLangIsoCode($arr_import_lang[0]))
|
if (Validate::isLangIsoCode($arr_import_lang[0]))
|
||||||
{
|
{
|
||||||
if ($content = Tools::file_get_contents(
|
$content = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/gzip/'.$arr_import_lang[1].'/'.Tools::strtolower($arr_import_lang[0]).'.gzip');
|
||||||
'http://www.prestashop.com/download/lang_packs/gzip/'.$arr_import_lang[1].'/'.Tools::strtolower($arr_import_lang[0]).'.gzip', false,
|
if ($content)
|
||||||
@stream_context_create(array('http' => array('method' => 'GET', 'timeout' => 5)))))
|
|
||||||
{
|
{
|
||||||
$file = _PS_TRANSLATIONS_DIR_.$arr_import_lang[0].'.gzip';
|
$file = _PS_TRANSLATIONS_DIR_.$arr_import_lang[0].'.gzip';
|
||||||
if ((bool)@file_put_contents($file, $content))
|
if ((bool)@file_put_contents($file, $content))
|
||||||
|
|||||||
Reference in new issue
Block a user