Details
-
Improvement
-
Status: Reopened
-
Minor
-
Resolution: Unresolved
-
2.2
-
None
-
MOODLE_22_STABLE
Description
This issue is creating an associated MDL for an orphan TODO in tag/lib.php, which I came across while working on [MDL-30992]...
tag/lib.php |
if ( array_key_exists($tag->ordering, $tag_ids) ) {
|
// until we can add a unique constraint, in table tag_instance,
|
// on (itemtype, itemid, ordering), this is needed to prevent a bug
|
// TODO : modify database in 2.0
|
$tag->ordering++;
|
}
|
The above code is an extract from the tag_get_tags_ids() function in tag/lib.php. Having a quick look at the tag_instance instance table it appears that there is still no unique id on itemtype, itemid and ordering, so this will need to be added before this todo can be resolved. However I did not write the TODO and it does not say what bug it is trying to prevent. It was last touched by scyrma, who I'm sure would have a much better idea of what needs to be done.