From b8b36bd94157705ca545581abfb75c116fc98859 Mon Sep 17 00:00:00 2001
From: Steven Wittens <steven@10.no-reply.drupal.org>
Date: Wed, 12 Jan 2005 16:02:42 +0000
Subject: [PATCH] - Fix comment pager counting unpublished comments.

---
 modules/comment.module         | 2 +-
 modules/comment/comment.module | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/comment.module b/modules/comment.module
index 86e89d9cdc10..e7529b4117be 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 c.status = 0 AND nid = '". db_escape_string($nid) ."'");
+      $result = pager_query($query, $comments_per_page, 0, "SELECT COUNT(*) FROM {comments} WHERE 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 86e89d9cdc10..e7529b4117be 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 c.status = 0 AND nid = '". db_escape_string($nid) ."'");
+      $result = pager_query($query, $comments_per_page, 0, "SELECT COUNT(*) FROM {comments} WHERE 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);
-- 
GitLab