From: toyomoyo Date: Thu, 16 Mar 2006 07:41:26 +0000 (+0000) Subject: case insensitive tag search X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=debaed9f71ec4db3ccda5e72ac7f9e86e9d17b19;p=moodle.git case insensitive tag search --- 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)) {