// Fix default id lang in localization packs
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16090 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -58,7 +58,11 @@ class LocalizationPackCore
|
|||||||
$res &= $this->_installLanguages($xml, $install_mode);
|
$res &= $this->_installLanguages($xml, $install_mode);
|
||||||
|
|
||||||
if ($res && isset($this->iso_code_lang))
|
if ($res && isset($this->iso_code_lang))
|
||||||
Configuration::updateValue('PS_LANG_DEFAULT', (int)Language::getIdByIso($this->iso_code_lang));
|
{
|
||||||
|
if (!$id_lang = (int)Language::getIdByIso($this->iso_code_lang))
|
||||||
|
$id_lang = 1;
|
||||||
|
Configuration::updateValue('PS_LANG_DEFAULT', $id_lang);
|
||||||
|
}
|
||||||
|
|
||||||
if ($install_mode && $res && isset($this->iso_currency))
|
if ($install_mode && $res && isset($this->iso_currency))
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -25,8 +25,8 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (file_exists(dirname(__FILE__).'/../config/settings.inc.php'))
|
if (file_exists(dirname(__FILE__).'/../../config/settings.inc.php'))
|
||||||
include_once(dirname(__FILE__).'/../config/settings.inc.php');
|
include_once(dirname(__FILE__).'/../../config/settings.inc.php');
|
||||||
|
|
||||||
abstract class DbCore
|
abstract class DbCore
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -186,7 +186,8 @@ class InstallModelInstall extends InstallAbstractModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
$flip_languages = array_flip($languages);
|
$flip_languages = array_flip($languages);
|
||||||
Configuration::updateGlobalValue('PS_LANG_DEFAULT', $flip_languages[$this->language->getLanguageIso()]);
|
$id_lang = (!empty($flip_languages[$this->language->getLanguageIso()])) ? $flip_languages[$this->language->getLanguageIso()] : 1;
|
||||||
|
Configuration::updateGlobalValue('PS_LANG_DEFAULT', $id_lang);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user