From b0e5aa3f06403f56adf6cba9ad8d60dcbfcea7bd Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 18 Jun 2011 20:19:54 -0400 Subject: - Patch #1188880 by mr.baileys, tstoeckler: comment module test fails randomly. --- modules/comment/comment.module | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/comment') 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(); -- cgit v1.2.3