From debaed9f71ec4db3ccda5e72ac7f9e86e9d17b19 Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Thu, 16 Mar 2006 07:41:26 +0000 Subject: [PATCH] case insensitive tag search --- blog/class.BlogFilter.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/blog/class.BlogFilter.php b/blog/class.BlogFilter.php index 2dfff0b4ce..710f048752 100755 --- a/blog/class.BlogFilter.php +++ b/blog/class.BlogFilter.php @@ -84,8 +84,11 @@ class BlogFilter { if ($tagid) { $this->tag = $tagid; } else if ($tag) { - $tagrec = get_record('tags', 'text', $tag); - $this->tag = $tagrec -> id; + if ($tagrec = get_record_sql('SELECT * FROM '.$CFG->prefix.'tags WHERE text LIKE "'.$tag.'"')) { + $this->tag = $tagrec -> id; + } else { + $this->tag = -1; //no record found + } } // borrowed from Jon's table class if(empty($this->baseurl)) { -- 2.39.5