diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-01-12 16:02:20 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-01-12 16:02:20 +0000 |
commit | bf12368205926df4f0e586a0f008b480d7833a4d (patch) | |
tree | 285991412b33b59c870013a034c2d3a49a9527ea | |
parent | bf09864c5ddf696590af2c8430b512e226b42660 (diff) | |
download | brdo-bf12368205926df4f0e586a0f008b480d7833a4d.tar.gz brdo-bf12368205926df4f0e586a0f008b480d7833a4d.tar.bz2 |
- Fix comment pager counting unpublished comments.
-rw-r--r-- | modules/comment.module | 2 | ||||
-rw-r--r-- | modules/comment/comment.module | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/comment.module b/modules/comment.module index cecc1b24b..86e89d9cd 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -846,7 +846,7 @@ function comment_render($node, $cid = 0) { } // Start a form, for use with comment control and moderation. - $result = pager_query($query, $comments_per_page, 0, "SELECT COUNT(*) FROM {comments} WHERE nid = '". db_escape_string($nid) ."'"); + $result = pager_query($query, $comments_per_page, 0, "SELECT COUNT(*) FROM {comments} WHERE c.status = 0 AND nid = '". db_escape_string($nid) ."'"); if (db_num_rows($result) && (variable_get('comment_controls', 0) == 0 || variable_get('comment_controls', 0) == 2)) { $output .= '<form method="post" action="'. url('comment') ."\"><div>\n"; $output .= theme('comment_controls', $threshold, $mode, $order, $comments_per_page); diff --git a/modules/comment/comment.module b/modules/comment/comment.module index cecc1b24b..86e89d9cd 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -846,7 +846,7 @@ function comment_render($node, $cid = 0) { } // Start a form, for use with comment control and moderation. - $result = pager_query($query, $comments_per_page, 0, "SELECT COUNT(*) FROM {comments} WHERE nid = '". db_escape_string($nid) ."'"); + $result = pager_query($query, $comments_per_page, 0, "SELECT COUNT(*) FROM {comments} WHERE c.status = 0 AND nid = '". db_escape_string($nid) ."'"); if (db_num_rows($result) && (variable_get('comment_controls', 0) == 0 || variable_get('comment_controls', 0) == 2)) { $output .= '<form method="post" action="'. url('comment') ."\"><div>\n"; $output .= theme('comment_controls', $threshold, $mode, $order, $comments_per_page); |