diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-01-22 03:11:54 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-01-22 03:11:54 +0000 |
commit | b4c737a2a5ed9bf9905c91107f94e42df36f2c44 (patch) | |
tree | 8bed38a803bf4f1c8dc1e657f42abe9cc2fd952d /modules/comment/comment.module | |
parent | 7ac380aa059bd901e7965445080d2fddef84f9e9 (diff) | |
download | brdo-b4c737a2a5ed9bf9905c91107f94e42df36f2c44.tar.gz brdo-b4c737a2a5ed9bf9905c91107f94e42df36f2c44.tar.bz2 |
#287178 by justinrandell: Break up various hook_form_alter()s to hook_form_FORM_ID_alters().
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 45cad76eb..951ac3c95 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -504,10 +504,10 @@ function comment_nodeapi_view($node, $teaser) { } /** - * Implementation of hook_form_alter(). + * Implementation of hook_form_FORM_ID_alter(). */ -function comment_form_alter(&$form, $form_state, $form_id) { - if ($form_id == 'node_type_form' && isset($form['identity']['type'])) { +function comment_form_node_type_form_alter(&$form, $form_state) { + if (isset($form['identity']['type'])) { $form['comment'] = array( '#type' => 'fieldset', '#title' => t('Comment settings'), @@ -571,7 +571,13 @@ function comment_form_alter(&$form, $form_state, $form_id) { '#options' => array(t('Display on separate page'), t('Display below post or comments')), ); } - elseif (!empty($form['#node_edit_form'])) { +} + +/** + * Implementation of hook_form_alter(). + */ +function comment_form_alter(&$form, $form_state, $form_id) { + if (!empty($form['#node_edit_form'])) { $node = $form['#node']; $form['comment_settings'] = array( '#type' => 'fieldset', |