comment_nodeapi_update_index($node)
drupal/modules/comment/comment.module, line 661
Implementation of hook_nodeapi_update_index().
function comment_nodeapi_update_index($node) {
$text = '';
$comments = db_query('SELECT subject, comment, format FROM {comment} WHERE nid = :nid AND status = :status', array(':nid' => $node->nid, ':status' => COMMENT_PUBLISHED));
foreach ($comments as $comment) {
$text .= '<h2>' . check_plain($comment->subject) . '</h2>' . check_markup($comment->comment, $comment->format, FALSE);
}
return $text;
}