mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-64588 core_comment: fix get_comment ordering when timestamps match
Include id in the sorting, to be sure that we always get the correct record in cases where the comment timestamps are the same.
This commit is contained in:
parent
6cd3d398a9
commit
ae94d477a6
@ -566,7 +566,7 @@ class comment {
|
||||
c.commentarea = :commentarea AND
|
||||
c.itemid = :itemid AND
|
||||
$componentwhere
|
||||
ORDER BY c.timecreated $sortdirection";
|
||||
ORDER BY c.timecreated $sortdirection, c.id $sortdirection";
|
||||
$params['contextid'] = $this->contextid;
|
||||
$params['commentarea'] = $this->commentarea;
|
||||
$params['itemid'] = $this->itemid;
|
||||
|
Loading…
x
Reference in New Issue
Block a user