From cda19b7ade4de4952f4449581e5d19f5e558871b Mon Sep 17 00:00:00 2001 From: scyrma Date: Thu, 19 Jun 2008 08:16:12 +0000 Subject: [PATCH] MDL-14679: fix regression in tag library --- tag/lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.39.5