make it more readable as deepdiver suggested

This commit is contained in:
Frank Karlitschek 2012-12-14 22:54:21 +01:00
parent b6b4c4c920
commit 2a55beab74
1 changed files with 6 additions and 2 deletions

View File

@ -696,8 +696,12 @@ class OC_Util {
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_USERAGENT, "ownCloud Server Crawler"); curl_setopt($curl, CURLOPT_USERAGENT, "ownCloud Server Crawler");
if(OC_Config::getValue('curlproxy','')=='') curl_setopt($curl, CURLOPT_PROXY, OC_Config::getValue('curlproxy')); if(OC_Config::getValue('curlproxy','')=='') {
if(OC_Config::getValue('curlproxyuserpwd','')=='') curl_setopt($curl, CURLOPT_PROXYUSERPWD, OC_Config::getValue('curlproxyuserpwd')); curl_setopt($curl, CURLOPT_PROXY, OC_Config::getValue('curlproxy'));
}
if(OC_Config::getValue('curlproxyuserpwd','')=='') {
curl_setopt($curl, CURLOPT_PROXYUSERPWD, OC_Config::getValue('curlproxyuserpwd'));
}
$data = curl_exec($curl); $data = curl_exec($curl);
curl_close($curl); curl_close($curl);