diff options
author | Andrew Dolgov <[email protected]> | 2021-02-23 09:01:27 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-23 09:01:27 +0300 |
commit | 2ae0b7059f2ed56b92a8f396c63224b36f71df09 (patch) | |
tree | 3aa1f8e8b0980c12f2b9d2b37a73034b9108acd8 /plugins | |
parent | 5229cc58b269bd04b2be7768107697063d95736e (diff) |
cleanup some defined-stuff
Diffstat (limited to 'plugins')
-rwxr-xr-x | plugins/af_redditimgur/init.php | 4 | ||||
-rwxr-xr-x | plugins/af_unburn/init.php | 8 | ||||
-rw-r--r-- | plugins/auth_remote/init.php | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php index 7d5aeff5a..1aa4793ea 100755 --- a/plugins/af_redditimgur/init.php +++ b/plugins/af_redditimgur/init.php @@ -701,7 +701,7 @@ class Af_RedditImgur extends Plugin { private function get_header($url, $header, $useragent = SELF_USER_AGENT) { $ret = false; - if (function_exists("curl_init") && !defined("NO_CURL")) { + if (function_exists("curl_init")) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_TIMEOUT, 5); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); @@ -727,7 +727,7 @@ class Af_RedditImgur extends Plugin { private function readability($article, $url, $doc, $xpath, $debug = false) { - if (!defined('NO_CURL') && function_exists("curl_init") && $this->host->get($this, "enable_readability") && + if (function_exists("curl_init") && $this->host->get($this, "enable_readability") && mb_strlen(strip_tags($article["content"])) <= 150) { // do not try to embed posts linking back to other reddit posts diff --git a/plugins/af_unburn/init.php b/plugins/af_unburn/init.php index 4d0c56740..386b6387f 100755 --- a/plugins/af_unburn/init.php +++ b/plugins/af_unburn/init.php @@ -21,7 +21,7 @@ class Af_Unburn extends Plugin { function hook_article_filter($article) { $owner_uid = $article["owner_uid"]; - if (defined('NO_CURL') || !function_exists("curl_init") || ini_get("open_basedir")) + if (!function_exists("curl_init") || ini_get("open_basedir")) return $article; if ((strpos($article["link"], "feedproxy.google.com") !== false || @@ -37,8 +37,8 @@ class Af_Unburn extends Plugin { curl_setopt($ch, CURLOPT_NOBODY, true); curl_setopt($ch, CURLOPT_USERAGENT, SELF_USER_AGENT); - if (defined('_CURL_HTTP_PROXY')) { - curl_setopt($ch, CURLOPT_PROXY, _CURL_HTTP_PROXY); + if (Config::get(Config::HTTP_PROXY)) { + curl_setopt($ch, CURLOPT_PROXY, Config::get(Config::HTTP_PROXY)); } @curl_exec($ch); @@ -80,4 +80,4 @@ class Af_Unburn extends Plugin { return 2; } -}
\ No newline at end of file +} diff --git a/plugins/auth_remote/init.php b/plugins/auth_remote/init.php index 85be67d05..f2dcfb318 100644 --- a/plugins/auth_remote/init.php +++ b/plugins/auth_remote/init.php @@ -56,7 +56,7 @@ class Auth_Remote extends Auth_Base { $_SESSION["hide_logout"] = true; // LemonLDAP can send user informations via HTTP HEADER - if (defined('AUTH_AUTO_CREATE') && AUTH_AUTO_CREATE){ + if (Config::get(Config::AUTH_AUTO_CREATE)) { // update user name $fullname = isset($_SERVER['HTTP_USER_NAME']) ? $_SERVER['HTTP_USER_NAME'] : ($_SERVER['AUTHENTICATE_CN'] ?? ""); if ($fullname){ |