cid; $values['comment-nid'] = $comment->nid; $values['comment-title'] = check_plain($comment->subject); $values['comment-body'] = check_markup($comment->comment, $comment->format, FALSE); $values['comment-author-name'] = check_plain($comment->name); $values['comment-author-uid'] = $comment->uid; $values['comment-author-homepage'] = check_url($comment->homepage); // Raw counterparts of user supplied data. $values['comment-title-raw'] = $comment->subject; $values['comment-body-raw'] = $comment->comment; $values['comment-author-name-raw'] = $comment->name; if (!empty($comment->mail)) { $account_mail = $comment->mail; } elseif (!empty($comment->uid)) { $account_mail = db_result(db_query("SELECT mail FROM {users} WHERE uid = %d", $comment->uid)); } else { $account_mail = ''; } $values['comment-author-mail'] = check_plain($account_mail); $values['comment-author-mail-raw'] = $account_mail; // Included in case a consuming module wants to format the body $values['comment-body-format'] = $comment->format; $values += token_get_date_token_values($comment->timestamp, 'comment-'); $values['comment-node-title-raw'] = db_result(db_query("SELECT title FROM {node} WHERE nid = %d", $comment->nid)); $values['comment-node-title'] = check_plain($values['comment-node-title-raw']); } return $values; }