Changes for module upgrade and suggession
This commit is contained in:
@@ -3318,7 +3318,7 @@ exit;
|
||||
}
|
||||
|
||||
$post_data = http_build_query(array(
|
||||
'version' => isset($params['version']) ? $params['version'] : _PS_VERSION_,
|
||||
'version' => isset($params['version']) ? $params['version'] : _QLOAPPS_VERSION_,
|
||||
'iso_lang' => Tools::strtolower(isset($params['iso_lang']) ? $params['iso_lang'] : Context::getContext()->language->iso_code),
|
||||
'iso_code' => Tools::strtolower(isset($params['iso_country']) ? $params['iso_country'] : Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT'))),
|
||||
'shop_url' => isset($params['shop_url']) ? $params['shop_url'] : Tools::getShopDomain(),
|
||||
@@ -3326,7 +3326,7 @@ exit;
|
||||
));
|
||||
|
||||
$protocols = array('https');
|
||||
$end_point = 'api.addons.prestashop.com';
|
||||
$end_point = 'api.qloapps.com';
|
||||
|
||||
switch ($request) {
|
||||
case 'native':
|
||||
@@ -3360,7 +3360,7 @@ exit;
|
||||
$post_data .= '&method=check&module_name='.urlencode($params['module_name']).'&module_key='.urlencode($params['module_key']);
|
||||
break;
|
||||
case 'module':
|
||||
$post_data .= '&method=module&id_module='.urlencode($params['id_module']);
|
||||
$post_data .= '&method=module&module_name='.urlencode($params['module_name']);
|
||||
if (isset($params['username_addons']) && isset($params['password_addons'])) {
|
||||
$post_data .= '&username='.urlencode($params['username_addons']).'&password='.urlencode($params['password_addons']);
|
||||
} else {
|
||||
@@ -3388,7 +3388,7 @@ exit;
|
||||
'method' => 'POST',
|
||||
'content' => $post_data,
|
||||
'header' => 'Content-type: application/x-www-form-urlencoded',
|
||||
'timeout' => 5,
|
||||
'timeout' => 10,
|
||||
)
|
||||
));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user