diff options
author | Andrew Dolgov <[email protected]> | 2020-09-17 19:02:27 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2020-09-17 19:02:27 +0300 |
commit | a4525d31b2536bc8ad9da013f4ed5168fac87d0a (patch) | |
tree | 9ae00d19d362a74693800b45efbbf6ffaddcdbb9 /plugins/af_redditimgur/init.php | |
parent | 57fac845166a2efa7244c61cce31442fc5600232 (diff) |
replace FALSE with false so that static analyzer shuts up about it
Diffstat (limited to 'plugins/af_redditimgur/init.php')
-rwxr-xr-x | plugins/af_redditimgur/init.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php index 8158538b2..b332ec588 100755 --- a/plugins/af_redditimgur/init.php +++ b/plugins/af_redditimgur/init.php @@ -94,7 +94,7 @@ class Af_RedditImgur extends Plugin { //$debug = 1; foreach ($entries as $entry) { - if ($entry->hasAttribute("href") && strpos($entry->getAttribute("href"), "reddit.com") === FALSE) { + if ($entry->hasAttribute("href") && strpos($entry->getAttribute("href"), "reddit.com") === false) { Debug::log("processing href: " . $entry->getAttribute("href"), Debug::$LOG_VERBOSE); @@ -140,7 +140,7 @@ class Af_RedditImgur extends Plugin { $content_type = $this->get_content_type($source_stream); - if (strpos($content_type, "video/") !== FALSE) { + if (strpos($content_type, "video/") !== false) { $this->handle_as_video($doc, $entry, $source_stream, $poster_url); $found = 1; } @@ -230,7 +230,7 @@ class Af_RedditImgur extends Plugin { $source_stream = str_replace(".gifv", ".mp4", $entry->getAttribute("href")); - if (strpos($source_stream, "imgur.com") !== FALSE) + if (strpos($source_stream, "imgur.com") !== false) $poster_url = str_replace(".mp4", "h.jpg", $source_stream); $this->handle_as_video($doc, $entry, $source_stream, $poster_url); @@ -265,8 +265,8 @@ class Af_RedditImgur extends Plugin { } if (!$found && (preg_match("/\.(jpg|jpeg|gif|png)(\?[0-9][0-9]*)?[$\?]/i", $entry->getAttribute("href")) || - mb_strpos($entry->getAttribute("href"), "i.reddituploads.com") !== FALSE || - mb_strpos($this->get_content_type($entry->getAttribute("href")), "image/") !== FALSE)) { + mb_strpos($entry->getAttribute("href"), "i.reddituploads.com") !== false || + mb_strpos($this->get_content_type($entry->getAttribute("href")), "image/") !== false)) { Debug::log("Handling as a picture", Debug::$LOG_VERBOSE); @@ -393,7 +393,7 @@ class Af_RedditImgur extends Plugin { function hook_article_filter($article) { - if (strpos($article["link"], "reddit.com/r/") !== FALSE) { + if (strpos($article["link"], "reddit.com/r/") !== false) { $doc = new DOMDocument(); @$doc->loadHTML($article["content"]); $xpath = new DOMXPath($doc); @@ -543,7 +543,7 @@ class Af_RedditImgur extends Plugin { // do not try to embed posts linking back to other reddit posts // readability.php requires PHP 5.6 - if ($url && strpos($url, "reddit.com") === FALSE && version_compare(PHP_VERSION, '5.6.0', '>=')) { + if ($url && strpos($url, "reddit.com") === false && version_compare(PHP_VERSION, '5.6.0', '>=')) { /* link may lead to a huge video file or whatever, we need to check content type before trying to parse it which p much requires curl */ @@ -551,7 +551,7 @@ class Af_RedditImgur extends Plugin { $useragent_compat = "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)"; $content_type = $this->get_content_type($url, $useragent_compat); - if ($content_type && strpos($content_type, "text/html") !== FALSE) { + if ($content_type && strpos($content_type, "text/html") !== false) { foreach ($this->host->get_hooks(PluginHost::HOOK_GET_FULL_TEXT) as $p) { $extracted_content = $p->hook_get_full_text($url); |