summaryrefslogtreecommitdiff
path: root/modules/comment/comment.pages.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-05-21 10:34:55 +0000
committerDries Buytaert <dries@buytaert.net>2009-05-21 10:34:55 +0000
commit1c079c3d321d0314396bcc97ff1b672ab841f99e (patch)
treec376e42f80c00f0b720037e6cf03fdf0736d130b /modules/comment/comment.pages.inc
parent76ba5ed5165459420fd46919ae35a244c4a0a070 (diff)
downloadbrdo-1c079c3d321d0314396bcc97ff1b672ab841f99e.tar.gz
brdo-1c079c3d321d0314396bcc97ff1b672ab841f99e.tar.bz2
- Patch #468944 by Berdir: database clean-ups for comment.module.
Diffstat (limited to 'modules/comment/comment.pages.inc')
-rw-r--r--modules/comment/comment.pages.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/comment/comment.pages.inc b/modules/comment/comment.pages.inc
index cc13b3cbb..4727fd95b 100644
--- a/modules/comment/comment.pages.inc
+++ b/modules/comment/comment.pages.inc
@@ -15,7 +15,7 @@
*/
function comment_edit($cid) {
global $user;
- $comment = db_query('SELECT c.*, u.uid, u.name AS registered_name, u.data FROM {comment} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = :cid', array(':cid'=>$cid) )->fetchObject();
+ $comment = db_query('SELECT c.*, u.uid, u.name AS registered_name, u.data FROM {comment} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = :cid', array(':cid'=>$cid))->fetchObject();
$comment = drupal_unpack($comment);
$comment->name = $comment->uid ? $comment->registered_name : $comment->name;
@@ -70,8 +70,9 @@ function comment_reply($node, $pid = NULL) {
if ($pid) {
// Load the comment whose cid = $pid
$comment = db_query('SELECT c.*, u.uid, u.name AS registered_name, u.signature, u.picture, u.data FROM {comment} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = :cid AND c.status = :status', array(
- ':cid'=>$pid,
- ':status'=>COMMENT_PUBLISHED))->fetchObject();
+ ':cid' => $pid,
+ ':status' => COMMENT_PUBLISHED,
+ ))->fetchObject();
if ( $comment ) {
// If that comment exists, make sure that the current comment and the
// parent comment both belong to the same parent node.