Commit 114ed8da authored by Steven Wittens's avatar Steven Wittens

- Fix comment pager counting unpublished comments.

parent afd422b8
......@@ -880,7 +880,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 = '". check_query($nid) ."'");
$result = pager_query($query, $comments_per_page, 0, "SELECT COUNT(*) FROM {comments} WHERE status = 0 AND nid = '". check_query($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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment