### Eclipse Workspace Patch 1.0
#P wordpress-trunk
|
|
|
|
| 1329 | 1329 | |
| 1330 | 1330 | if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) { |
| 1331 | 1331 | |
| 1332 | | $isPHP5 = version_compare(PHP_VERSION, '5.0.0', '>='); |
| | 1332 | curl_setopt( $handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP ); |
| | 1333 | curl_setopt( $handle, CURLOPT_PROXY, $proxy->host() ); |
| | 1334 | curl_setopt( $handle, CURLOPT_PROXYPORT, $proxy->port() ); |
| 1333 | 1335 | |
| 1334 | | if ( $isPHP5 ) { |
| 1335 | | curl_setopt( $handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP ); |
| 1336 | | curl_setopt( $handle, CURLOPT_PROXY, $proxy->host() ); |
| 1337 | | curl_setopt( $handle, CURLOPT_PROXYPORT, $proxy->port() ); |
| 1338 | | } else { |
| 1339 | | curl_setopt( $handle, CURLOPT_PROXY, $proxy->host() .':'. $proxy->port() ); |
| 1340 | | } |
| 1341 | | |
| 1342 | 1336 | if ( $proxy->use_authentication() ) { |
| 1343 | | if ( $isPHP5 ) |
| 1344 | | curl_setopt( $handle, CURLOPT_PROXYAUTH, CURLAUTH_ANY ); |
| 1345 | | |
| | 1337 | curl_setopt( $handle, CURLOPT_PROXYAUTH, CURLAUTH_ANY ); |
| 1346 | 1338 | curl_setopt( $handle, CURLOPT_PROXYUSERPWD, $proxy->authentication() ); |
| 1347 | 1339 | } |
| 1348 | 1340 | } |