From 4e193e1cf6defba0df7f06b0e22db4d6a7c96f49 Mon Sep 17 00:00:00 2001 From: crash890 Date: Fri, 31 Jul 2015 16:57:41 -0400 Subject: [PATCH] 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. (cherry picked from commit 620d8e01b8aa49e8be867eb9fe385ef72b156230) --- pandora_console/include/ajax/update_manager.ajax.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/ajax/update_manager.ajax.php b/pandora_console/include/ajax/update_manager.ajax.php index e134ba719d..b35350519b 100644 --- a/pandora_console/include/ajax/update_manager.ajax.php +++ b/pandora_console/include/ajax/update_manager.ajax.php @@ -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); } -?> \ No newline at end of file +?>