Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
This commit is contained in:
@@ -858,15 +858,13 @@ abstract class ObjectModelCore
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
$values = $this->$field;
|
$values = $this->$field;
|
||||||
|
|
||||||
|
// If the object has not been loaded in multilanguage, then the value is the one for the current language of the object
|
||||||
if (!is_array($values))
|
if (!is_array($values))
|
||||||
{
|
$values = array($this->id_lang => $values);
|
||||||
$value = $values;
|
|
||||||
$values = array();
|
|
||||||
$values[$this->id_lang] = $value;
|
|
||||||
$values[Configuration::get('PS_LANG_DEFAULT')] = $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($values[Configuration::get('PS_LANG_DEFAULT')]))
|
// The value for the default must always be set, so we put an empty string if it does not exists
|
||||||
|
if (!isset($values[Configuration::get('PS_LANG_DEFAULT')]))
|
||||||
$values[Configuration::get('PS_LANG_DEFAULT')] = '';
|
$values[Configuration::get('PS_LANG_DEFAULT')] = '';
|
||||||
|
|
||||||
foreach ($values as $id_lang => $value)
|
foreach ($values as $id_lang => $value)
|
||||||
|
|||||||
@@ -1509,6 +1509,8 @@ class AdminControllerCore extends Controller
|
|||||||
*/
|
*/
|
||||||
protected function initTabModuleList()
|
protected function initTabModuleList()
|
||||||
{
|
{
|
||||||
|
if (!$this->isFresh(Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, 86400))
|
||||||
|
@file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, Tools::addonsRequest('must-have'));
|
||||||
if (!$this->isFresh(Module::CACHE_FILE_TAB_MODULES_LIST, 604800))
|
if (!$this->isFresh(Module::CACHE_FILE_TAB_MODULES_LIST, 604800))
|
||||||
$this->refresh(Module::CACHE_FILE_TAB_MODULES_LIST, 'http://'.Tab::TAB_MODULE_LIST_URL);
|
$this->refresh(Module::CACHE_FILE_TAB_MODULES_LIST, 'http://'.Tab::TAB_MODULE_LIST_URL);
|
||||||
|
|
||||||
|
|||||||
@@ -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