From: Andrew Dolgov Date: Tue, 4 Jun 2013 11:34:04 +0000 (+0400) Subject: fix nsfw plugin X-Git-Tag: 1.8~34 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=445d1c10440e54d4c35150aaebf58868c4aaf3c6;p=tt-rss.git fix nsfw plugin --- diff --git a/plugins/nsfw/init.php b/plugins/nsfw/init.php index a57aa445..79979076 100644 --- a/plugins/nsfw/init.php +++ b/plugins/nsfw/init.php @@ -24,8 +24,9 @@ class NSFW extends Plugin { function hook_render_article($article) { $tags = array_map("trim", explode(", ", $this->host->get($this, "tags"))); + $a_tags = array_map("trim", explode(", ", $article["tag_cache"])); - if (count(array_intersect($tags, $article["tags"])) > 0) { + if (count(array_intersect($tags, $a_tags)) > 0) { $article["content"] = "
"; } @@ -35,8 +36,9 @@ class NSFW extends Plugin { function hook_render_article_cdm($article) { $tags = array_map("trim", explode(", ", $this->host->get($this, "tags"))); + $a_tags = array_map("trim", explode(", ", $article["tag_cache"])); - if (count(array_intersect($tags, $article["tags"])) > 0) { + if (count(array_intersect($tags, $a_tags)) > 0) { $article["content"] = "
"; }