diff --git a/locallib.php b/locallib.php index 75f26cb..d1d4924 100644 --- a/locallib.php +++ b/locallib.php @@ -707,7 +707,7 @@ function oublog_get_posts($oublog, $context, $offset = 0, $cm, $groupid, $indivi FROM {oublog_comments} c LEFT JOIN {user} u ON c.userid = u.id WHERE c.postid IN (".implode(",", $postids).") AND c.deletedby IS NULL - ORDER BY c.timeposted ASC "; + ORDER BY c.timeposted ASC, c.id ASC "; $rs = $DB->get_recordset_sql($sql); foreach ($rs as $comment) { @@ -800,7 +800,7 @@ function oublog_get_post($postid, $canaudit=false) { $sql .= "AND c.deletedby IS NULL "; } - $sql .= "ORDER BY c.timeposted ASC "; + $sql .= "ORDER BY c.timeposted ASC, c.id ASC "; $rs = $DB->get_recordset_sql($sql, array($postid)); foreach ($rs as $comment) {