summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-09-27 18:34:59 +0000
committerDries Buytaert <dries@buytaert.net>2005-09-27 18:34:59 +0000
commit45f4bcaa7d379df9c6b4ee748f8ebdb8a49478bd (patch)
tree38178641ef68ebccf5f94a6c1bc7ba816b96fe15
parentdff2df4809e494afe9fd5b7901cd2a974ab77afc (diff)
downloadbrdo-45f4bcaa7d379df9c6b4ee748f8ebdb8a49478bd.tar.gz
brdo-45f4bcaa7d379df9c6b4ee748f8ebdb8a49478bd.tar.bz2
- Patch #26031 by leafish_dylan: fixed comment pager (broken SQL query).
-rw-r--r--modules/comment.module2
-rw-r--r--modules/comment/comment.module2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/comment.module b/modules/comment.module
index 3e26e24a7..854a9bf59 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -906,7 +906,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 status = %d AND nid = %d", $nid, COMMENT_PUBLISHED);
+ $result = pager_query($query, $comments_per_page, 0, "SELECT COUNT(*) FROM {comments} WHERE nid = %d AND status = %d" , $nid, COMMENT_PUBLISHED);
if (db_num_rows($result) && (variable_get('comment_controls', 3) == 0 || variable_get('comment_controls', 3) == 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 3e26e24a7..854a9bf59 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -906,7 +906,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 status = %d AND nid = %d", $nid, COMMENT_PUBLISHED);
+ $result = pager_query($query, $comments_per_page, 0, "SELECT COUNT(*) FROM {comments} WHERE nid = %d AND status = %d" , $nid, COMMENT_PUBLISHED);
if (db_num_rows($result) && (variable_get('comment_controls', 3) == 0 || variable_get('comment_controls', 3) == 2)) {
$output .= '<form method="post" action="'. url('comment') ."\"><div>\n";
$output .= theme('comment_controls', $threshold, $mode, $order, $comments_per_page);