diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-02-17 05:31:31 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-02-17 05:31:31 +0000 |
commit | 579e39b46555854b0b38b518f59a71cd9e71c4ae (patch) | |
tree | 615ca57a6700760fd518b61d1ba4a275d4ea37b9 /modules/comment/comment.module | |
parent | 2f097f48cb768a341784f22dbfd095c4d39ada18 (diff) | |
download | brdo-579e39b46555854b0b38b518f59a71cd9e71c4ae.tar.gz brdo-579e39b46555854b0b38b518f59a71cd9e71c4ae.tar.bz2 |
#314349 by mfb, Damien Tournoud, catch, scor, cha0s: Fixed random failures from comment paging tests.
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index ee0f0764f..68be18b92 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -523,7 +523,8 @@ function comment_new_page_count($num_comments, $new_replies, $node) { ->fields('comment', array('thread')) ->condition('nid', $node->nid) ->condition('status', COMMENT_PUBLISHED) - ->orderBy('changed', 'DESC') + ->orderBy('created', 'DESC') + ->orderBy('cid', 'DESC') ->range(0, $new_replies); // 2. Find the first thread. @@ -1643,7 +1644,7 @@ function comment_num_new($nid, $timestamp = 0) { $timestamp = ($timestamp > NODE_NEW_LIMIT ? $timestamp : NODE_NEW_LIMIT); // Use the timestamp to retrieve the number of new comments. - return db_query('SELECT COUNT(cid) FROM {comment} WHERE nid = :nid AND changed > :timestamp AND status = :status', array( + return db_query('SELECT COUNT(cid) FROM {comment} WHERE nid = :nid AND created > :timestamp AND status = :status', array( ':nid' => $nid, ':timestamp' => $timestamp, ':status' => COMMENT_PUBLISHED, |