diff options
author | Neil Drumm <drumm@3064.no-reply.drupal.org> | 2006-08-06 23:00:42 +0000 |
---|---|---|
committer | Neil Drumm <drumm@3064.no-reply.drupal.org> | 2006-08-06 23:00:42 +0000 |
commit | 129c8eb18c47bf7b0e0fe35ac6bc1b7ee38d177f (patch) | |
tree | 6ff2bc019570712eabe871cd5d6c0c5b1c7194b8 /modules/comment/comment.module | |
parent | 0299beb05ee4af647fbb25ae113018e05aeb39ba (diff) | |
download | brdo-129c8eb18c47bf7b0e0fe35ac6bc1b7ee38d177f.tar.gz brdo-129c8eb18c47bf7b0e0fe35ac6bc1b7ee38d177f.tar.bz2 |
#62340 by chx, webchick, Jaza, Eaton, mathieu, and myself. Configurable node types.
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 fed6e19d3..f135e27cb 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -265,10 +265,16 @@ function comment_link($type, $node = NULL, $teaser = FALSE) { } function comment_form_alter($form_id, &$form) { - if (isset($form['type'])) { - if ($form['type']['#value'] .'_node_settings' == $form_id) { - $form['workflow']['comment_'. $form['type']['#value']] = array('#type' => 'radios', '#title' => t('Default comment setting'), '#default_value' => variable_get('comment_'. $form['type']['#value'], COMMENT_NODE_READ_WRITE), '#options' => array(t('Disabled'), t('Read only'), t('Read/Write')), '#description' => t('Users with the <em>administer comments</em> permission will be able to override this setting.')); - } + if ($form_id == 'node_type_form' && isset($form['identity']['type'])) { + $form['workflow']['comment'] = array( + '#type' => 'radios', + '#title' => t('Default comment setting'), + '#default_value' => variable_get('comment_'. $form['identity']['type']['#default_value'], COMMENT_NODE_READ_WRITE), + '#options' => array(t('Disabled'), t('Read only'), t('Read/Write')), + '#description' => t('Users with the <em>administer comments</em> permission will be able to override this setting.'), + ); + } + elseif (isset($form['type'])) { if ($form['type']['#value'] .'_node_form' == $form_id) { $node = $form['#node']; if (user_access('administer comments')) { |