summaryrefslogtreecommitdiff
path: root/modules/comment
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comment')
-rw-r--r--modules/comment/comment.module35
1 files changed, 14 insertions, 21 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 7aaed2fc7..4bb83df6c 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -281,27 +281,20 @@ function comment_form_alter($form_id, &$form) {
elseif (isset($form['type'])) {
if ($form['type']['#value'] .'_node_form' == $form_id) {
$node = $form['#node'];
- if (user_access('administer comments')) {
- $form['comment_settings'] = array(
- '#type' => 'fieldset',
- '#title' => t('Comment settings'),
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
- '#weight' => 30,
- );
- $form['comment_settings']['comment'] = array(
- '#type' => 'radios',
- '#parents' => array('comment'),
- '#default_value' => $node->comment,
- '#options' => array(t('Disabled'), t('Read only'), t('Read/Write')),
- );
- }
- else {
- $form['comment_settings']['comment'] = array(
- '#type' => 'value',
- '#value' => $node->comment,
- );
- }
+ $form['comment_settings'] = array(
+ '#type' => 'fieldset',
+ '#access' => user_access('administer comments'),
+ '#title' => t('Comment settings'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ '#weight' => 30,
+ );
+ $form['comment_settings']['comment'] = array(
+ '#type' => 'radios',
+ '#parents' => array('comment'),
+ '#default_value' => $node->comment,
+ '#options' => array(t('Disabled'), t('Read only'), t('Read/Write')),
+ );
}
}
}