From f8a5828b80f63a7cb93f2788aa0fb72fa8017891 Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 12 Feb 2012 07:36:43 +0000 Subject: [PATCH] lower case for comparisons --- contrib/not_a_tag/main.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/contrib/not_a_tag/main.php b/contrib/not_a_tag/main.php index e1a8b353..ba18c04b 100644 --- a/contrib/not_a_tag/main.php +++ b/contrib/not_a_tag/main.php @@ -17,15 +17,20 @@ class NotATag extends Extension { $this->scan($event->tags); } - private function scan($tags) { + private function scan(/*array*/ $tags_mixed) { global $config; + $text = $config->get_string("not_a_tag_untags"); if(empty($text)) return; + + $tags = array(); + foreach($tags_mixed as $tag) $tags[] = strtolower($tag); + $pairs = explode("\n", $text); foreach($pairs as $pair) { $tag_url = explode(",", $pair); if(count($tag_url) != 2) continue; - $tag = $tag_url[0]; + $tag = strtolower($tag_url[0]); $url = $tag_url[1]; if(in_array($tag, $tags)) { header("Location: $url");