nsfw: fix wrong delimiter when expanding tag_cache

This commit is contained in:
Andrew Dolgov 2013-06-05 10:27:53 +04:00
parent be9d5df19b
commit 838b374431
1 changed files with 4 additions and 4 deletions

View File

@ -23,8 +23,8 @@ class NSFW extends Plugin {
} }
function hook_render_article($article) { function hook_render_article($article) {
$tags = array_map("trim", explode(", ", $this->host->get($this, "tags"))); $tags = array_map("trim", explode(",", $this->host->get($this, "tags")));
$a_tags = array_map("trim", explode(", ", $article["tag_cache"])); $a_tags = array_map("trim", explode(",", $article["tag_cache"]));
if (count(array_intersect($tags, $a_tags)) > 0) { 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> $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) { function hook_render_article_cdm($article) {
$tags = array_map("trim", explode(", ", $this->host->get($this, "tags"))); $tags = array_map("trim", explode(",", $this->host->get($this, "tags")));
$a_tags = array_map("trim", explode(", ", $article["tag_cache"])); $a_tags = array_map("trim", explode(",", $article["tag_cache"]));
if (count(array_intersect($tags, $a_tags)) > 0) { 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> $article["content"] = "<div class='nswf wrapper'><button onclick=\"nsfwShow(this)\">".__("Not work safe (click to toggle)")."</button>