summaryrefslogtreecommitdiff
path: root/modules/comment
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2011-06-18 20:19:54 -0400
committerDries Buytaert <dries@buytaert.net>2011-06-18 20:19:54 -0400
commitb0e5aa3f06403f56adf6cba9ad8d60dcbfcea7bd (patch)
treea18d6492ae101c36ec05d368fbb8b8458c3c7dac /modules/comment
parente3de4550acb794e7b3589576d1e734bc4e05b8af (diff)
downloadbrdo-b0e5aa3f06403f56adf6cba9ad8d60dcbfcea7bd.tar.gz
brdo-b0e5aa3f06403f56adf6cba9ad8d60dcbfcea7bd.tar.bz2
- Patch #1188880 by mr.baileys, tstoeckler: comment module test fails randomly.
Diffstat (limited to 'modules/comment')
-rw-r--r--modules/comment/comment.module3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 4a737557d..0381fac7d 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -508,6 +508,9 @@ function comment_get_recent($number = 10) {
->condition('c.status', COMMENT_PUBLISHED)
->condition('n.status', NODE_PUBLISHED)
->orderBy('c.created', 'DESC')
+ // Additionally order by cid to ensure that comments with the same timestamp
+ // are returned in the exact order posted.
+ ->orderBy('c.cid', 'DESC')
->range(0, $number)
->execute()
->fetchAll();