Index: modules/comment.module =================================================================== RCS file: /cvs/drupal/drupal/modules/Attic/comment.module,v retrieving revision 1.455.2.16 diff -u -p -r1.455.2.16 comment.module --- modules/comment.module 27 May 2007 16:11:26 -0000 1.455.2.16 +++ modules/comment.module 16 Oct 2007 21:23:23 -0000 @@ -568,7 +568,7 @@ function comment_save($edit) { } // Add the comment to database. - $status = user_access('post comments without approval') ? COMMENT_PUBLISHED : COMMENT_NOT_PUBLISHED; + $edit['status'] = user_access('post comments without approval') ? COMMENT_PUBLISHED : COMMENT_NOT_PUBLISHED; $roles = variable_get('comment_roles', array()); $score = 0; @@ -629,7 +629,7 @@ function comment_save($edit) { $edit['name'] = $user->name; } - db_query("INSERT INTO {comments} (cid, nid, pid, uid, subject, comment, format, hostname, timestamp, status, score, users, thread, name, mail, homepage) VALUES (%d, %d, %d, %d, '%s', '%s', %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s')", $edit['cid'], $edit['nid'], $edit['pid'], $edit['uid'], $edit['subject'], $edit['comment'], $edit['format'], $_SERVER['REMOTE_ADDR'], $edit['timestamp'], $status, $score, $users, $thread, $edit['name'], $edit['mail'], $edit['homepage']); + db_query("INSERT INTO {comments} (cid, nid, pid, uid, subject, comment, format, hostname, timestamp, status, score, users, thread, name, mail, homepage) VALUES (%d, %d, %d, %d, '%s', '%s', %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s')", $edit['cid'], $edit['nid'], $edit['pid'], $edit['uid'], $edit['subject'], $edit['comment'], $edit['format'], $_SERVER['REMOTE_ADDR'], $edit['timestamp'], $edit['status'], $score, $users, $thread, $edit['name'], $edit['mail'], $edit['homepage']); _comment_update_node_statistics($edit['nid']); @@ -645,7 +645,7 @@ function comment_save($edit) { // Explain the approval queue if necessary, and then // redirect the user to the node he's commenting on. - if ($status == COMMENT_NOT_PUBLISHED) { + if ($edit['status'] == COMMENT_NOT_PUBLISHED) { drupal_set_message(t('Your comment has been queued for moderation by site administrators and will be published after approval.')); } return $edit['cid'];