[-] BO : Fix bug #PSCFI-7231 strtolower iso_lang for package download link

This commit is contained in:
gRoussac
2013-05-27 18:13:13 +02:00
committed by Francois Gaillard
parent 4eabc11573
commit a04e6b1a67
4 changed files with 6 additions and 6 deletions
@@ -489,7 +489,7 @@ class AdminLanguagesControllerCore extends AdminController
}
// Get all iso code available
if ($lang_packs = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/get_language_pack.php?version='.Tools::getValue('ps_version').'&iso_lang='.Tools::getValue('iso_lang')))
if ($lang_packs = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/get_language_pack.php?version='.Tools::getValue('ps_version').'&iso_lang='.Tools::strtolower(Tools::getValue('iso_lang'))))
{
$result = Tools::jsonDecode($lang_packs);
if ($lang_packs !== '' && $result && !isset($result->error))
@@ -720,7 +720,7 @@ class AdminTranslationsControllerCore extends AdminController
if (Validate::isLangIsoCode($arr_import_lang[0]))
{
if ($content = Tools::file_get_contents(
'http://www.prestashop.com/download/lang_packs/gzip/'.$arr_import_lang[1].'/'.$arr_import_lang[0].'.gzip', false,
'http://www.prestashop.com/download/lang_packs/gzip/'.$arr_import_lang[1].'/'.Tools::strtolower($arr_import_lang[0]).'.gzip', false,
@stream_context_create(array('http' => array('method' => 'GET', 'timeout' => 5)))))
{
$file = _PS_TRANSLATIONS_DIR_.$arr_import_lang[0].'.gzip';