[-] Installer: installer now work even if no settings.inc.php file is created with an installer session already here
This commit is contained in:
+6
-6
@@ -2347,16 +2347,16 @@ exit;
|
|||||||
$addons_url = 'api.addons.prestashop.com';
|
$addons_url = 'api.addons.prestashop.com';
|
||||||
$postData = '';
|
$postData = '';
|
||||||
$postDataArray = array(
|
$postDataArray = array(
|
||||||
'version' => _PS_VERSION_,
|
'version' => isset($params['version']) ? $params['version'] : _PS_VERSION_,
|
||||||
'iso_lang' => strtolower(Context::getContext()->language->iso_code),
|
'iso_lang' => Tools::strtolower(isset($params['iso_lang']) ? $params['iso_lang'] : Context::getContext()->language->iso_code),
|
||||||
'iso_code' => strtolower(Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT'))),
|
'iso_code' => Tools::strtolower(isset($params['iso_country']) ? $params['iso_country'] : Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT'))),
|
||||||
'shop_url' => urlencode(Tools::getShopDomain()),
|
'shop_url' => urlencode(isset($params['shop_url']) ? $params['shop_url'] : Tools::getShopDomain()),
|
||||||
'mail' => urlencode(Configuration::get('PS_SHOP_EMAIL'))
|
'mail' => urlencode(isset($params['email']) ? $params['email'] : Configuration::get('email'))
|
||||||
);
|
);
|
||||||
foreach ($postDataArray as $postDataKey => $postDataValue)
|
foreach ($postDataArray as $postDataKey => $postDataValue)
|
||||||
$postData .= '&'.$postDataKey.'='.$postDataValue;
|
$postData .= '&'.$postDataKey.'='.$postDataValue;
|
||||||
$postData = ltrim($postData, '&');
|
$postData = ltrim($postData, '&');
|
||||||
|
|
||||||
// Config for each request
|
// Config for each request
|
||||||
if ($request == 'native')
|
if ($request == 'native')
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -331,8 +331,6 @@ class InstallControllerHttpProcess extends InstallControllerHttp
|
|||||||
*/
|
*/
|
||||||
public function display()
|
public function display()
|
||||||
{
|
{
|
||||||
$this->initializeContext();
|
|
||||||
|
|
||||||
// The installer SHOULD take less than 32M, but may take up to 35/36M sometimes. So 42M is a good value :)
|
// The installer SHOULD take less than 32M, but may take up to 35/36M sometimes. So 42M is a good value :)
|
||||||
$low_memory = Tools::getMemoryLimit() < Tools::getOctets('42M');
|
$low_memory = Tools::getMemoryLimit() < Tools::getOctets('42M');
|
||||||
|
|
||||||
@@ -361,8 +359,15 @@ class InstallControllerHttpProcess extends InstallControllerHttp
|
|||||||
$this->process_steps[] = $install_modules;
|
$this->process_steps[] = $install_modules;
|
||||||
|
|
||||||
$install_modules = array('key' => 'installModulesAddons', 'lang' => $this->l('Install modules Addons'));
|
$install_modules = array('key' => 'installModulesAddons', 'lang' => $this->l('Install modules Addons'));
|
||||||
|
|
||||||
|
$params = array('iso_lang' => $this->language->getLanguageIso(),
|
||||||
|
'iso_country' => $this->session->shop_country,
|
||||||
|
'email' => $this->session->admin_email,
|
||||||
|
'shop_url' => Tools::getHttpHost(),
|
||||||
|
'version' => _PS_INSTALL_VERSION_);
|
||||||
|
|
||||||
if ($low_memory)
|
if ($low_memory)
|
||||||
foreach ($this->model_install->getAddonsModulesList() as $module)
|
foreach ($this->model_install->getAddonsModulesList($params) as $module)
|
||||||
$install_modules['subtasks'][] = array('module' => (string)$module['name'], 'id_module' => (string)$module['id_module']);
|
$install_modules['subtasks'][] = array('module' => (string)$module['name'], 'id_module' => (string)$module['id_module']);
|
||||||
$this->process_steps[] = $install_modules;
|
$this->process_steps[] = $install_modules;
|
||||||
|
|
||||||
|
|||||||
@@ -587,10 +587,10 @@ class InstallModelInstall extends InstallAbstractModel
|
|||||||
return $modules;
|
return $modules;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAddonsModulesList()
|
public function getAddonsModulesList($params = array())
|
||||||
{
|
{
|
||||||
$addons_modules = array();
|
$addons_modules = array();
|
||||||
$content = Tools::addonsRequest('install-modules');
|
$content = Tools::addonsRequest('install-modules', $params);
|
||||||
$xml = @simplexml_load_string($content, null, LIBXML_NOCDATA);
|
$xml = @simplexml_load_string($content, null, LIBXML_NOCDATA);
|
||||||
|
|
||||||
if ($xml !== false and isset($xml->module))
|
if ($xml !== false and isset($xml->module))
|
||||||
|
|||||||
Reference in New Issue
Block a user