'#description'=>t('Your signature will be publicly displayed at the end of your comments.'));
return$form;
}
elseif($type=='delete'){
if($type=='delete'){
db_query('UPDATE {comments} SET uid = 0 WHERE uid = %d',$user->uid);
db_query('UPDATE {node_comment_statistics} SET last_comment_uid = 0 WHERE last_comment_uid = %d',$user->uid);
}
...
...
@@ -647,7 +630,7 @@ function comment_reply($node, $pid = NULL) {
// $pid indicates that this is a reply to a comment.
if($pid){
// load the comment whose cid = $pid
if($comment=db_fetch_object(db_query('SELECT c.*, u.uid, u.name AS registered_name, u.picture, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = %d',$pid,COMMENT_PUBLISHED))){
if($comment=db_fetch_object(db_query('SELECT c.*, u.uid, u.name AS registered_name, u.signature, u.picture, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = %d',$pid,COMMENT_PUBLISHED))){
// If that comment exists, make sure that the current comment and the parent comment both
// belong to the same parent node.
if($comment->nid!=$node->nid){
...
...
@@ -658,6 +641,7 @@ function comment_reply($node, $pid = NULL) {
@@ -1631,9 +1619,10 @@ function comment_form_add_preview($form, $edit) {
$output='';
if($edit['pid']){
$comment=db_fetch_object(db_query('SELECT c.*, u.uid, u.name AS registered_name, u.picture, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = %d',$edit['pid'],COMMENT_PUBLISHED));
$comment=db_fetch_object(db_query('SELECT c.*, u.uid, u.name AS registered_name, u.signature, u.picture, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = %d',$edit['pid'],COMMENT_PUBLISHED));