summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-01-02 14:01:38 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2013-01-02 14:01:38 -0800
commit9dc5ea172e9f8d386fc08602cc460637679daf22 (patch)
tree470099bfc0f107fe4e2602d582ad0ab2371b9847
parent824071730937889f0fdfcaae6420536e5a9d06f2 (diff)
parent1e3231c73220f667446da8627a747eb4b2fe0c63 (diff)
downloadnextcloud-server-9dc5ea172e9f8d386fc08602cc460637679daf22.tar.gz
nextcloud-server-9dc5ea172e9f8d386fc08602cc460637679daf22.zip
Merge pull request #975 from irgsmirx/patch-1
Update lib/util.php
-rwxr-xr-xlib/util.php29
1 files changed, 21 insertions, 8 deletions
diff --git a/lib/util.php b/lib/util.php
index 4170de2125a..98f0d053e32 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -688,14 +688,27 @@ class OC_Util {
curl_close($curl);
} else {
-
- $ctx = stream_context_create(
- array(
- 'http' => array(
- 'timeout' => 10
- )
- )
- );
+ $contextArray = null;
+
+ if(OC_Config::getValue('proxy','')<>'') {
+ $contextArray = array(
+ 'http' => array(
+ 'timeout' => 10,
+ 'proxy' => OC_Config::getValue('proxy')
+ )
+ );
+ } else {
+ $contextArray = array(
+ 'http' => array(
+ 'timeout' => 10
+ )
+ );
+ }
+
+
+ $ctx = stream_context_create(
+ $contextArray
+ );
$data=@file_get_contents($url, 0, $ctx);
}