diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-12-14 23:04:42 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-12-15 00:43:46 +0100 |
commit | f39454ed12018402f38a8f6bf99fc94d676a0a3a (patch) | |
tree | 096e5a5263809359693517a6f90b0d433f6fcd61 /lib/util.php | |
parent | 8256650da881214e652353c9b79a5ba7964965e5 (diff) | |
download | nextcloud-server-f39454ed12018402f38a8f6bf99fc94d676a0a3a.tar.gz nextcloud-server-f39454ed12018402f38a8f6bf99fc94d676a0a3a.zip |
Fix "Line indented incorrectly"
Diffstat (limited to 'lib/util.php')
-rwxr-xr-x | lib/util.php | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/lib/util.php b/lib/util.php index 34c4d4f9b11..fc1c889c31d 100755 --- a/lib/util.php +++ b/lib/util.php @@ -586,7 +586,7 @@ class OC_Util { /** * Check if the ownCloud server can connect to the internet */ - public static function isinternetconnectionworking() { + public static function isinternetconnectionworking() { // try to connect to owncloud.org to see if http connections to the internet are possible. $connected = @fsockopen("www.owncloud.org", 80); @@ -685,34 +685,34 @@ class OC_Util { * If not, file_get_element is used. */ - public static function getUrlContent($url){ + public static function getUrlContent($url){ - if (function_exists('curl_init')) { - - $curl = curl_init(); - - curl_setopt($curl, CURLOPT_HEADER, 0); - curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10); - curl_setopt($curl, CURLOPT_URL, $url); - curl_setopt($curl, CURLOPT_USERAGENT, "ownCloud Server Crawler"); - $data = curl_exec($curl); - curl_close($curl); - - } else { - - $ctx = stream_context_create( - array( - 'http' => array( - 'timeout' => 10 - ) - ) - ); - $data=@file_get_contents($url, 0, $ctx); - - } - - return $data; - } + if (function_exists('curl_init')) { + + $curl = curl_init(); + + curl_setopt($curl, CURLOPT_HEADER, 0); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10); + curl_setopt($curl, CURLOPT_URL, $url); + curl_setopt($curl, CURLOPT_USERAGENT, "ownCloud Server Crawler"); + $data = curl_exec($curl); + curl_close($curl); + + } else { + + $ctx = stream_context_create( + array( + 'http' => array( + 'timeout' => 10 + ) + ) + ); + $data=@file_get_contents($url, 0, $ctx); + + } + + return $data; + } } |