From 1dd0064cb2f2fdffb92d42f09f1814882e8d39bc Mon Sep 17 00:00:00 2001 From: fram Date: Mon, 18 Nov 2013 15:30:05 +0100 Subject: [PATCH 1/4] // fixed typo in Russian installer --- install-dev/langs/ru/install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-dev/langs/ru/install.php b/install-dev/langs/ru/install.php index b077f8b24..3b45452c8 100644 --- a/install-dev/langs/ru/install.php +++ b/install-dev/langs/ru/install.php @@ -212,7 +212,7 @@ return array( 'Contact us' => 'Свяжитесь с нами', 'PrestaShop Installation Assistant' => 'Помощник установки PrestaShop', 'Installation Assistant' => 'Помощник установки', - 'License Agreements' => 'Лицензионное соглшение', + 'License Agreements' => 'Лицензионное соглашение', 'Print my login information' => 'Распечатать информацию о моем аккаунте', 'To use PrestaShop, you must create a database to collect all of your store\'s data-related activities.' => 'Для использования PrestaShop, Вам следует создать базу данных , чтобы сгруппировать информацию Вашего магазина.', 'Please complete the fields below in order for PrestaShop to connect to your database. ' => 'Заполните поля ниже, чтобы PrestaShop смог установить соединение с Вашей с базой данных.', From 1f71090b8682a5ad30aba3662aa0d2043c121d7c Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Mon, 18 Nov 2013 15:37:21 +0100 Subject: [PATCH 2/4] // Timeout increased for translation download #PSCFV-11046 --- controllers/admin/AdminTranslationsController.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/controllers/admin/AdminTranslationsController.php b/controllers/admin/AdminTranslationsController.php index 781581eca..02f8a238f 100644 --- a/controllers/admin/AdminTranslationsController.php +++ b/controllers/admin/AdminTranslationsController.php @@ -207,8 +207,8 @@ class AdminTranslationsControllerCore extends AdminController $packs_to_update = array(); $token = Tools::getAdminToken('AdminLanguages'.(int)Tab::getIdFromClassName('AdminLanguages').(int)$this->context->employee->id); $file_name = $this->link_lang_pack.'?version='._PS_VERSION_; - $array_stream_context = array('http' => array('method' => 'GET', 'timeout' => 5)); - if ($lang_packs = Tools::file_get_contents($file_name, false, @stream_context_create($array_stream_context))) + $array_stream_context = @stream_context_create(array('http' => array('method' => 'GET', 'timeout' => 8))); + if ($lang_packs = Tools::file_get_contents($file_name, false, $array_stream_context)) // Notice : for php < 5.2 compatibility, Tools::jsonDecode. The second parameter to true will set us if ($lang_packs != '' && $lang_packs = Tools::jsonDecode($lang_packs, true)) foreach ($lang_packs as $key => $lang_pack) @@ -768,7 +768,8 @@ class AdminTranslationsControllerCore extends AdminController $arr_import_lang = explode('|', Tools::getValue('params_import_language')); /* 0 = Language ISO code, 1 = PS version */ if (Validate::isLangIsoCode($arr_import_lang[0])) { - $content = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/gzip/'.$arr_import_lang[1].'/'.Tools::strtolower($arr_import_lang[0]).'.gzip'); + $array_stream_context = @stream_context_create(array('http' => array('method' => 'GET', 'timeout' => 10))); + $content = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/gzip/'.$arr_import_lang[1].'/'.Tools::strtolower($arr_import_lang[0]).'.gzip', false, $array_stream_context); if ($content) { $file = _PS_TRANSLATIONS_DIR_.$arr_import_lang[0].'.gzip'; From 5d0b188eedd5c5b1634f247fa08d96a8a8597b13 Mon Sep 17 00:00:00 2001 From: rGaillard Date: Mon, 18 Nov 2013 16:19:02 +0100 Subject: [PATCH 3/4] // small fix --- .../themeconfigurator/themeconfigurator.php | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/themeconfigurator/themeconfigurator.php b/modules/themeconfigurator/themeconfigurator.php index 0d94cf6c5..c21c20e8e 100644 --- a/modules/themeconfigurator/themeconfigurator.php +++ b/modules/themeconfigurator/themeconfigurator.php @@ -96,7 +96,7 @@ class ThemeConfigurator extends Module Configuration::updateValue('PS_QUICK_VIEW', (int)Tools::getValue('quick_view')); foreach($this->getConfigurableModules() as $module) { - if (!isset($module['is_module']) || !$module['is_module'] || !Validate::isModuleName($module['name'])) + if (!isset($module['is_module']) || !$module['is_module'] || !Validate::isModuleName($module['name']) || !Tools::isSubmit($module['name'])) continue; $module_instance = Module::getInstanceByName($module['name']); @@ -186,49 +186,49 @@ class ThemeConfigurator extends Module 'label' => $this->l('Display the reinsurance block'), 'name' => 'blockreinsurance', 'desc' => ''.$this->l('Configure the reinsurance block').'', - 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('blockreinsurance')) && $module->active), + 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('blockreinsurance')) && $module->isEnabledForShopContext()), 'is_module' => true, ), array( 'label' => $this->l('Display the social following links'), 'name' => 'blocksocial', 'desc' => ''.$this->l('Configure the social following links').'', - 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('blocksocial')) && $module->active), + 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('blocksocial')) && $module->isEnabledForShopContext()), 'is_module' => true, ), array( 'label' => $this->l('Display contact information'), 'name' => 'blockcontactinfos', 'desc' => ''.$this->l('Configure the contact information of your store').'', - 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('blockcontactinfos')) && $module->active), + 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('blockcontactinfos')) && $module->isEnabledForShopContext()), 'is_module' => true, ), array( 'label' => $this->l('Display social buttons on the products page'), 'name' => 'addsharethis', 'desc' => ''.$this->l('Configure').'', - 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('addsharethis')) && $module->active), + 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('addsharethis')) && $module->isEnabledForShopContext()), 'is_module' => true, ), array( 'label' => $this->l('Display facebook block on the home page'), 'name' => 'blockfacebook', 'desc' => ''.$this->l('Configure').'', - 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('blockfacebook')) && $module->active), + 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('blockfacebook')) && $module->isEnabledForShopContext()), 'is_module' => true, ), array( 'label' => $this->l('Customer cms information block'), 'name' => 'blockcmsinfo', 'desc' => ''.$this->l('Configure').'', - 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('blockcmsinfo')) && $module->active), + 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('blockcmsinfo')) && $module->isEnabledForShopContext()), 'is_module' => true, ), array( 'label' => $this->l('Customer banner information block'), 'name' => 'tmhtmlcontent', 'desc' => ''.$this->l('Configure').'', - 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('tmhtmlcontent')) && $module->active), + 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('tmhtmlcontent')) && $module->isEnabledForShopContext()), 'is_module' => true, ), array( @@ -240,14 +240,14 @@ class ThemeConfigurator extends Module 'label' => $this->l('Enable top banner'), 'name' => 'blockbanner', 'desc' => ''.$this->l('Configure').'', - 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('blockbanner')) && $module->active), + 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('blockbanner')) && $module->isEnabledForShopContext()), 'is_module' => true, ), array( 'label' => $this->l('Enable product payment logos'), 'name' => 'productpaymentlogos', 'desc' => ''.$this->l('Configure').'', - 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('productpaymentlogos')) && $module->active), + 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('productpaymentlogos')) && $module->isEnabledForShopContext()), 'is_module' => true, ) ); From 43a54b10bffd9ec0cddde304604af7f4b8d6059d Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Mon, 18 Nov 2013 17:00:12 +0100 Subject: [PATCH 4/4] // Reverted revert --- modules/dashactivity/dashactivity.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/dashactivity/dashactivity.php b/modules/dashactivity/dashactivity.php index 11043100d..a2eb1beb4 100644 --- a/modules/dashactivity/dashactivity.php +++ b/modules/dashactivity/dashactivity.php @@ -392,14 +392,14 @@ class Dashactivity extends Module $fields_form['form']['input'][] = array( 'label' => $this->l('Cart abandoned (min)'), 'desc' => $this->l('Default time range (min) to consider a Shopping cart as abandoned (default 24hrs)'), - 'name' => 'DASHACTIVITY_CART_ABANDONED', + 'name' => 'DASHACTIVITY_CART_ABANDONED_MIN', 'type' => 'text', 'suffix' => $this->l('hrs'), ); $fields_form['form']['input'][] = array( 'label' => $this->l('Cart abandoned (max)'), 'desc' => $this->l('Default time range (max) to consider a Shopping cart as abandoned (default 48hrs)'), - 'name' => 'DASHACTIVITY_CART_ABANDONED', + 'name' => 'DASHACTIVITY_CART_ABANDONED_MAX', 'type' => 'text', 'suffix' => $this->l('hrs'), );