summaryrefslogtreecommitdiff
path: root/classes/urlhelper.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-23 09:01:27 +0300
committerAndrew Dolgov <[email protected]>2021-02-23 09:01:27 +0300
commit2ae0b7059f2ed56b92a8f396c63224b36f71df09 (patch)
tree3aa1f8e8b0980c12f2b9d2b37a73034b9108acd8 /classes/urlhelper.php
parent5229cc58b269bd04b2be7768107697063d95736e (diff)
cleanup some defined-stuff
Diffstat (limited to 'classes/urlhelper.php')
-rw-r--r--classes/urlhelper.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/classes/urlhelper.php b/classes/urlhelper.php
index 42aa069e6..bf2e22a76 100644
--- a/classes/urlhelper.php
+++ b/classes/urlhelper.php
@@ -123,9 +123,9 @@ class UrlHelper {
'protocol_version'=> 1.1)
);
- if (defined('_HTTP_PROXY')) {
+ if (Config::get(Config::HTTP_PROXY)) {
$context_options['http']['request_fulluri'] = true;
- $context_options['http']['proxy'] = _HTTP_PROXY;
+ $context_options['http']['proxy'] = Config::get(Config::HTTP_PROXY);
}
$context = stream_context_create($context_options);
@@ -231,7 +231,7 @@ class UrlHelper {
return false;
}
- if (!defined('NO_CURL') && function_exists('curl_init') && !ini_get("open_basedir")) {
+ if (function_exists('curl_init') && !ini_get("open_basedir")) {
$fetch_curl_used = true;
@@ -283,8 +283,8 @@ class UrlHelper {
curl_setopt($ch, CURLOPT_COOKIEJAR, "/dev/null");
}
- if (defined('_HTTP_PROXY')) {
- curl_setopt($ch, CURLOPT_PROXY, _HTTP_PROXY);
+ if (Config::get(Config::HTTP_PROXY)) {
+ curl_setopt($ch, CURLOPT_PROXY, Config::get(Config::HTTP_PROXY));
}
if ($post_query) {
@@ -408,9 +408,9 @@ class UrlHelper {
if ($http_referrer)
array_push($context_options['http']['header'], "Referer: $http_referrer");
- if (defined('_HTTP_PROXY')) {
+ if (Config::get(Config::HTTP_PROXY)) {
$context_options['http']['request_fulluri'] = true;
- $context_options['http']['proxy'] = _HTTP_PROXY;
+ $context_options['http']['proxy'] = Config::get(Config::HTTP_PROXY);
}
$context = stream_context_create($context_options);