multiple fixes
This commit is contained in:
parent
2cfe4378c2
commit
7b5ae40868
|
@ -28,7 +28,7 @@ $action_update_url_update_manager = (bool) get_parameter(
|
|||
);
|
||||
|
||||
if (!$action_update_url_update_manager) {
|
||||
$url_update_manager = get_parameter('url_update_manager', $config['url_update_manager']);
|
||||
$url_update_manager = get_parameter('url_update_manager', get_um_url());
|
||||
$update_manager_proxy_server = get_parameter('update_manager_proxy_server', $config['update_manager_proxy_server']);
|
||||
$update_manager_proxy_port = get_parameter('update_manager_proxy_port', $config['update_manager_proxy_port']);
|
||||
$update_manager_proxy_user = get_parameter('update_manager_proxy_user', $config['update_manager_proxy_user']);
|
||||
|
|
|
@ -2740,6 +2740,31 @@ function config_check()
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves base url stored for Update Manager.
|
||||
*
|
||||
* @return string URL.
|
||||
*/
|
||||
function get_um_url()
|
||||
{
|
||||
global $config;
|
||||
|
||||
if (isset($config['url_update_manager'])) {
|
||||
$url = $config['url_update_manager'];
|
||||
$url = substr($url, 0, (strlen($url) - strpos(strrev($url), '/')));
|
||||
} else {
|
||||
$url = 'https://licensing.artica.es/pandoraupdate7/';
|
||||
config_update_value(
|
||||
'url_update_manager',
|
||||
'https://licensing.artica.es/pandoraupdate7/server.php'
|
||||
);
|
||||
}
|
||||
|
||||
return $url;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return in bytes
|
||||
*
|
||||
|
|
|
@ -1211,7 +1211,7 @@ function update_manager_check_online_free_packages_available()
|
|||
];
|
||||
|
||||
$curlObj = curl_init();
|
||||
curl_setopt($curlObj, CURLOPT_URL, $config['url_update_manager']);
|
||||
curl_setopt($curlObj, CURLOPT_URL, get_um_url());
|
||||
curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curlObj, CURLOPT_POST, true);
|
||||
curl_setopt($curlObj, CURLOPT_POSTFIELDS, $params);
|
||||
|
@ -1285,7 +1285,7 @@ function update_manager_check_online_free_packages($is_ajax=true)
|
|||
*/
|
||||
|
||||
$curlObj = curl_init();
|
||||
curl_setopt($curlObj, CURLOPT_URL, $config['url_update_manager']);
|
||||
curl_setopt($curlObj, CURLOPT_URL, get_um_url());
|
||||
curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curlObj, CURLOPT_POST, true);
|
||||
curl_setopt($curlObj, CURLOPT_POSTFIELDS, $params);
|
||||
|
@ -1436,7 +1436,7 @@ function update_manager_curl_request($action, $additional_params=false)
|
|||
$params['action'] = $action;
|
||||
|
||||
$curlObj = curl_init();
|
||||
curl_setopt($curlObj, CURLOPT_URL, $config['url_update_manager']);
|
||||
curl_setopt($curlObj, CURLOPT_URL, get_um_url());
|
||||
curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curlObj, CURLOPT_POST, true);
|
||||
curl_setopt($curlObj, CURLOPT_POSTFIELDS, $params);
|
||||
|
|
Loading…
Reference in New Issue