diff options
author | YoungMin Park <[email protected]> | 2014-11-04 11:49:43 +0900 |
---|---|---|
committer | YoungMin Park <[email protected]> | 2014-11-04 11:49:43 +0900 |
commit | a5bbb2bec133bdee08b361628f32430ae3884107 (patch) | |
tree | b203105149ec234ebe155d5718d2cbb6390b4a45 /plugins/af_unburn/init.php | |
parent | 12727ad17d125eb2f3f243231ccca1cb0a5a7b4b (diff) | |
parent | 2f43089de1ead3f164b8b31967d1abbb784319fa (diff) |
Merge pull request #1 from gothfox/master
Update from original
Diffstat (limited to 'plugins/af_unburn/init.php')
-rw-r--r-- | plugins/af_unburn/init.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/af_unburn/init.php b/plugins/af_unburn/init.php index a97502b12..5c9bc1387 100644 --- a/plugins/af_unburn/init.php +++ b/plugins/af_unburn/init.php @@ -24,8 +24,6 @@ class Af_Unburn extends Plugin { strpos($article["link"], "/~r/") !== FALSE || strpos($article["link"], "feedsportal.com") !== FALSE)) { - if (strpos($article["plugin_data"], "unburn,$owner_uid:") === FALSE) { - if (ini_get("safe_mode") || ini_get("open_basedir")) { $ch = curl_init(geturl($article["link"])); } else { @@ -38,7 +36,11 @@ class Af_Unburn extends Plugin { curl_setopt($ch, CURLOPT_FOLLOWLOCATION, !ini_get("safe_mode") && !ini_get("open_basedir")); curl_setopt($ch, CURLOPT_USERAGENT, SELF_USER_AGENT); - $contents = @curl_exec($ch); + if (defined('_CURL_HTTP_PROXY')) { + curl_setopt($ch, CURLOPT_PROXY, _CURL_HTTP_PROXY); + } + + @curl_exec($ch); $real_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL); @@ -69,9 +71,6 @@ class Af_Unburn extends Plugin { $article["plugin_data"] = "unburn,$owner_uid:" . $article["plugin_data"]; $article["link"] = $real_url; } - } else if (isset($article["stored"]["link"])) { - $article["link"] = $article["stored"]["link"]; - } } return $article; |