Skip to content

Commit

Permalink
Merge pull request pkp#767 from bozana/1187fix-master
Browse files Browse the repository at this point in the history
pkp/pkp-lib#1187 consider proxy settings for external feed plugin
  • Loading branch information
bozana committed Feb 26, 2016
2 parents 7d31078 + eac92dc commit 1b067b0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugins/generic/externalFeed/simplepie/SimplePie.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -7677,6 +7677,13 @@ function SimplePie_File($url, $timeout = 10, $redirects = 5, $headers = null, $u
curl_setopt($fp, CURLOPT_ENCODING, '');
}
curl_setopt($fp, CURLOPT_URL, $url);
if ($httpProxyHost = Config::getVar('proxy', 'http_host')) {
curl_setopt($fp, CURLOPT_PROXY, $httpProxyHost);
curl_setopt($fp, CURLOPT_PROXYPORT, Config::getVar('proxy', 'http_port', '80'));
if ($username = Config::getVar('proxy', 'username')) {
curl_setopt($fp, CURLOPT_PROXYUSERPWD, $username . ':' . Config::getVar('proxy', 'password'));
}
}
curl_setopt($fp, CURLOPT_HEADER, 1);
curl_setopt($fp, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($fp, CURLOPT_TIMEOUT, $timeout);
Expand Down

0 comments on commit 1b067b0

Please sign in to comment.