MDL-41339 Tags: Added unique tag instance id to tag_get_tags functions

Avoids php warnings on creating new tags
This commit is contained in:
Jenny Gray
2013-10-17 13:46:34 +01:00
parent f8eff10319
commit fc45e6767f
+1 -1
View File
@@ -324,7 +324,7 @@ function tag_get_tags($record_type, $record_id, $type=null, $userid=0) {
$params['userid'] = $userid;
}
$sql = "SELECT tg.id, tg.tagtype, tg.name, tg.rawname, tg.flag, ti.ordering
$sql = "SELECT ti.id as taginstanceid, 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 $u $sql_type