X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=plugins%2Fnsfw%2Finit.php;h=6a1ae3c65a23958c6a167ed43bb43603daa0b8e8;hb=ed1262d55a01a6ffbefe01eb3b5fc22d33dfad24;hp=79979076b5a833062e4d8ba1b4544b3a1377a924;hpb=445d1c10440e54d4c35150aaebf58868c4aaf3c6;p=tt-rss.git
diff --git a/plugins/nsfw/init.php b/plugins/nsfw/init.php
index 79979076..6a1ae3c6 100644
--- a/plugins/nsfw/init.php
+++ b/plugins/nsfw/init.php
@@ -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"] = "
@@ -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"] = "
@@ -70,9 +70,9 @@ class NSFW extends Plugin {
}
";
- print "
";
- print "
";
- print "
";
+ print_hidden("op", "pluginhandler");
+ print_hidden("method", "save");
+ print_hidden("plugin", "nsfw");
print "
";
@@ -90,7 +90,7 @@ class NSFW extends Plugin {
}
function save() {
- $tags = explode(",", db_escape_string($_POST["tags"]));
+ $tags = explode(",", $_POST["tags"]);
$tags = array_map("trim", $tags);
$tags = array_map("mb_strtolower", $tags);
$tags = join(", ", $tags);
@@ -104,5 +104,4 @@ class NSFW extends Plugin {
return 2;
}
-}
-?>
+}
\ No newline at end of file