diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-11-20 06:49:47 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-11-20 06:49:47 +0000 |
commit | 4cc8ae69a1df3d7ac1f33122c1a6afa6ba65fc0f (patch) | |
tree | fef7107ec164b66c946453221d33ed5ccd193450 /modules/comment/comment.module | |
parent | 9abb496d8a32da3e644d6c0095a89d76544ba211 (diff) | |
download | brdo-4cc8ae69a1df3d7ac1f33122c1a6afa6ba65fc0f.tar.gz brdo-4cc8ae69a1df3d7ac1f33122c1a6afa6ba65fc0f.tar.bz2 |
#830704 by fago, effulgentsia, Frando: Fixed entity forms cannot be properly extended.
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 31738a566..2e9b86ade 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -2003,7 +2003,6 @@ function comment_form($form, &$form_state, $comment) { // Attach fields. $comment->node_type = 'comment_node_' . $node->type; - $form['#builder_function'] = 'comment_form_submit_build_comment'; field_attach_form('comment', $comment, $form, $form_state); return $form; @@ -2013,7 +2012,7 @@ function comment_form($form, &$form_state, $comment) { * Build a preview from submitted form values. */ function comment_form_build_preview($form, &$form_state) { - $comment = $form['#builder_function']($form, $form_state); + $comment = comment_form_submit_build_comment($form, $form_state); $form_state['comment_preview'] = comment_preview($comment); $form_state['rebuild'] = TRUE; } @@ -2154,7 +2153,7 @@ function comment_submit($comment) { /** * Updates the form state's comment entity by processing this submission's values. * - * This is the default #builder_function for the comment form. It is called + * This is the default builder function for the comment form. It is called * during the "Save" and "Preview" submit handlers to retrieve the entity to * save or preview. This function can also be called by a "Next" button of a * wizard to update the form state's entity with the current step's values @@ -2174,7 +2173,7 @@ function comment_form_submit_build_comment($form, &$form_state) { */ function comment_form_submit($form, &$form_state) { $node = node_load($form_state['values']['nid']); - $comment = $form['#builder_function']($form, $form_state); + $comment = comment_form_submit_build_comment($form, $form_state); if (user_access('post comments') && (user_access('administer comments') || $node->comment == COMMENT_NODE_OPEN)) { // Save the anonymous user information to a cookie for reuse. if (!$comment->uid) { |