summaryrefslogtreecommitdiff
path: root/modules/comment.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-08-06 21:00:43 +0000
committerDries Buytaert <dries@buytaert.net>2004-08-06 21:00:43 +0000
commit821c6d2d17892ba4b4cfb7771e94953a1e3d5dac (patch)
tree63c8c8ccb98eb3e11d4df0a58373ad7b4f7eb44e /modules/comment.module
parent9e54dc27ff91c7bf2d8edb1bf07f9c893a3b1ae8 (diff)
downloadbrdo-821c6d2d17892ba4b4cfb7771e94953a1e3d5dac.tar.gz
brdo-821c6d2d17892ba4b4cfb7771e94953a1e3d5dac.tar.bz2
- Patch #9812 by Adrian: fixed some PostgreSQL/ANSI SQL compabitibility
problems created by the new comment and node access permissions code.
Diffstat (limited to 'modules/comment.module')
-rw-r--r--modules/comment.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/comment.module b/modules/comment.module
index 8c528d313..349635bc1 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -765,7 +765,7 @@ function comment_render($node, $cid = 0) {
$output .= '<form method="post" action="'. url('comment') ."\"><div>\n";
$output .= form_hidden('nid', $nid);
- $result = db_query('SELECT c.cid, c.pid, c.nid, c.subject, c.comment, c.timestamp, c.name, c.mail, c.homepage, u.uid, u.name AS registered_name, u.picture, u.data, c.score, c.users FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = 0 GROUP BY c.cid, c.pid, c.nid, c.subject, c.comment, c.timestamp, u.uid, u.name, u.picture, u.data, c.score, c.users', $cid);
+ $result = db_query('SELECT c.cid, c.pid, c.nid, c.subject, c.comment, c.timestamp, c.name, c.mail, c.homepage, u.uid, u.name AS registered_name, u.picture, u.data, c.score, c.users FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = 0 GROUP BY c.cid, c.pid, c.nid, c.subject, c.comment, c.timestamp, c.name, c.mail, u.picture, c.homepage, u.uid, u.name, u.picture, u.data, c.score, c.users', $cid);
if ($comment = db_fetch_object($result)) {
$comment->name = $comment->registered_name ? $comment->registered_name : $comment->name;
@@ -782,7 +782,7 @@ function comment_render($node, $cid = 0) {
$query .= "SELECT c.cid as cid, c.pid, c.nid, c.subject, c.comment, c.timestamp, c.name , c.mail, c.homepage, u.uid, u.name AS registered_name, u.picture, u.data, c.score, c.users, c.thread FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.nid = '". check_query($nid) ."' AND c.status = 0";
- $query .= ' GROUP BY c.cid, c.pid, c.nid, c.subject, c.comment, c.timestamp, 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.timestamp, c.name, c.mail, u.picture, c.homepage, u.uid, u.name, u.picture, u.data, c.score, c.users, c.thread';
/*
** We want to use the standard pager, but threads would need every