comment_form_submit_build_comment

Versions
7
comment_form_submit_build_comment($form, &$form_state)

Build a comment by processing form values and prepare for a form rebuild.

▾ 2 functions call comment_form_submit_build_comment()

comment_form_build_preview in modules/comment/comment.module
Build a preview from submitted form values.
comment_form_submit in modules/comment/comment.module
Process comment form submissions; prepare the comment, store it, and set a redirection target.

Code

modules/comment/comment.module, line 2026

<?php
function comment_form_submit_build_comment($form, &$form_state) {
  $comment = comment_submit($form_state['values']);

  field_attach_submit('comment', $comment, $form, $form_state);

  $form_state['comment'] = (array)$comment;
  $form_state['rebuild'] = TRUE;
  return $comment;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.