Update update_manager.ajax.php

This would be to include proxy configuration in the download process. Without this Proxy will work to check for downloads, but the actual download does not respect the proxy settings.
This commit is contained in:
crash890 2015-07-31 16:57:41 -04:00
parent 9353bdcdcb
commit 620d8e01b8
1 changed files with 11 additions and 1 deletions

View File

@ -353,6 +353,16 @@ if ($update_last_free_package) {
//curl_setopt($curlObj, CURLOPT_POST, true);
//curl_setopt($curlObj, CURLOPT_POSTFIELDS, $params);
curl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, false);
if (isset($config['update_manager_proxy_server'])) {
curl_setopt($curlObj, CURLOPT_PROXY, $config['update_manager_proxy_server']);
}
if (isset($config['update_manager_proxy_port'])) {
curl_setopt($curlObj, CURLOPT_PROXYPORT, $config['update_manager_proxy_port']);
}
if (isset($config['update_manager_proxy_user'])) {
curl_setopt($curlObj, CURLOPT_PROXYUSERPWD, $config['update_manager_proxy_user'] . ':' . $config['update_manager_proxy_password']);
}
$result = curl_exec($curlObj);
$http_status = curl_getinfo($curlObj, CURLINFO_HTTP_CODE);
@ -477,4 +487,4 @@ if ($install_free_package) {
$return["message"]= __("The package is installed.");
echo json_encode($return);
}
?>
?>