diff options
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 4a737557d..8d0c3d362 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(); @@ -1366,7 +1369,7 @@ function comment_node_search_result($node) { // Do not make a string if comments are closed and there are currently // zero comments. if ($node->comment != COMMENT_NODE_CLOSED || $comments > 0) { - return format_plural($comments, '1 comment', '@count comments'); + return array('comment' => format_plural($comments, '1 comment', '@count comments')); } } } |