From 0484fcd1ed3ff9b0e408aecd69234f677dd3cdcf Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 17 Apr 2006 20:45:00 +0000 Subject: [PATCH] - Patch #58921 by markus_petrux: critical bug: database error when rendering comments in PostgreSQL. Tested with MySQL only! --- modules/comment.module | 6 +++--- modules/comment/comment.module | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/comment.module b/modules/comment.module index 413f5603078..af8b51d1ac4 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -120,7 +120,7 @@ function comment_menu($may_cache) { $items[] = array('path' => 'admin/comment/configure/settings', 'title' => t('settings'), 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); - + $items[] = array('path' => 'comment/delete', 'title' => t('delete comment'), 'callback' => 'comment_delete', 'access' => $access, 'type' => MENU_CALLBACK); @@ -732,7 +732,7 @@ function comment_render($node, $cid = 0) { $query .= ' AND c.status = %d'; $query_args[] = COMMENT_PUBLISHED; } - $query .= ' GROUP BY c.cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, u.picture, c.homepage, u.uid, u.name, u.picture, u.data, c.score, c.users'; + $query .= ' GROUP BY c.cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, u.picture, c.homepage, u.uid, u.name, u.picture, u.data, c.score, c.users, c.status'; $result = db_query($query, $query_args); if ($comment = db_fetch_object($result)) { @@ -752,7 +752,7 @@ function comment_render($node, $cid = 0) { $query_args[] = COMMENT_PUBLISHED; } - $query .= ' GROUP BY c.cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, u.picture, c.homepage, u.uid, u.name, u.picture, u.data, c.score, c.users, c.thread'; + $query .= ' GROUP BY c.cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, u.picture, c.homepage, u.uid, u.name, u.picture, u.data, c.score, c.users, c.thread, c.status'; /* ** We want to use the standard pager, but threads would need every diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 413f5603078..af8b51d1ac4 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -120,7 +120,7 @@ function comment_menu($may_cache) { $items[] = array('path' => 'admin/comment/configure/settings', 'title' => t('settings'), 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); - + $items[] = array('path' => 'comment/delete', 'title' => t('delete comment'), 'callback' => 'comment_delete', 'access' => $access, 'type' => MENU_CALLBACK); @@ -732,7 +732,7 @@ function comment_render($node, $cid = 0) { $query .= ' AND c.status = %d'; $query_args[] = COMMENT_PUBLISHED; } - $query .= ' GROUP BY c.cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, u.picture, c.homepage, u.uid, u.name, u.picture, u.data, c.score, c.users'; + $query .= ' GROUP BY c.cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, u.picture, c.homepage, u.uid, u.name, u.picture, u.data, c.score, c.users, c.status'; $result = db_query($query, $query_args); if ($comment = db_fetch_object($result)) { @@ -752,7 +752,7 @@ function comment_render($node, $cid = 0) { $query_args[] = COMMENT_PUBLISHED; } - $query .= ' GROUP BY c.cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, u.picture, c.homepage, u.uid, u.name, u.picture, u.data, c.score, c.users, c.thread'; + $query .= ' GROUP BY c.cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, u.picture, c.homepage, u.uid, u.name, u.picture, u.data, c.score, c.users, c.thread, c.status'; /* ** We want to use the standard pager, but threads would need every