comment_form_submit
Definition
comment_form_submit($form, &$form_state)
modules/comment/comment.module, line 1535
Description
Process comment form submissions; prepare the comment, store it, and set a redirection target.
Code
<?php
function comment_form_submit($form, &$form_state) {
_comment_form_submit($form_state['values']);
if ($cid = comment_save($form_state['values'])) {
$node = node_load($form_state['values']['nid']);
$page = comment_new_page_count($node->comment_count, 1, $node);
$form_state['redirect'] = array('node/'. $node->nid, $page, "comment-$cid");
return;
}
}
?> 