Browse files

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

Avoids php warnings on creating new tags
  • Loading branch information...
1 parent 945aa97 commit 7a9000b1ffce5c9638c98bea9365ddefb4b70925 @jennymgray jennymgray committed Oct 11, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 tag/lib.php
View
2 tag/lib.php
@@ -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

0 comments on commit 7a9000b

Please sign in to comment.