]> git.wh0rd.org - tt-rss.git/commitdiff
nsfw: fix wrong delimiter when expanding tag_cache
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 5 Jun 2013 06:27:53 +0000 (10:27 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 5 Jun 2013 06:27:53 +0000 (10:27 +0400)
plugins/nsfw/init.php

index 79979076b5a833062e4d8ba1b4544b3a1377a924..51566592383cecac780c19a4eef201fd3ac1e03f 100644 (file)
@@ -23,8 +23,8 @@ 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"]));
+               $tags = array_map("trim", explode(",", $this->host->get($this, "tags")));
+               $a_tags = array_map("trim", explode(",", $article["tag_cache"]));
 
                if (count(array_intersect($tags, $a_tags)) > 0) {
                        $article["content"] = "<div class='nswf wrapper'><button onclick=\"nsfwShow(this)\">".__("Not work safe (click to toggle)")."</button>
@@ -35,8 +35,8 @@ 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"]));
+               $tags = array_map("trim", explode(",", $this->host->get($this, "tags")));
+               $a_tags = array_map("trim", explode(",", $article["tag_cache"]));
 
                if (count(array_intersect($tags, $a_tags)) > 0) {
                        $article["content"] = "<div class='nswf wrapper'><button onclick=\"nsfwShow(this)\">".__("Not work safe (click to toggle)")."</button>