From: scyrma Date: Thu, 19 Jun 2008 08:16:12 +0000 (+0000) Subject: MDL-14679: fix regression in tag library X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=cda19b7ade4de4952f4449581e5d19f5e558871b;p=moodle.git MDL-14679: fix regression in tag library --- diff --git a/tag/lib.php b/tag/lib.php index 78671a51cc..cd61643638 100644 --- a/tag/lib.php +++ b/tag/lib.php @@ -247,15 +247,15 @@ function tag_get_tags($record_type, $record_id, $type=null) { $params = array(); if ($type) { - $type = "AND tg.tagtype = :type"; + $sql_type = "AND tg.tagtype = :type"; $params['type'] = $type; } else { - $type = ''; + $sql_type = ''; } $sql = "SELECT tg.id, tg.tagtype, tg.name, tg.rawname, tg.flag, ti.ordering FROM {tag_instance} ti JOIN {tag} tg ON tg.id = ti.tagid - WHERE ti.itemtype = :recordtype AND ti.itemid = :recordid $type + WHERE ti.itemtype = :recordtype AND ti.itemid = :recordid $sql_type ORDER BY ti.ordering ASC"; $params['recordtype'] = $record_type; $params['recordid'] = $record_id;