summaryrefslogtreecommitdiff
path: root/modules/comment
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-11-27 11:11:46 +0000
committerDries Buytaert <dries@buytaert.net>2005-11-27 11:11:46 +0000
commitc647b39c2c67c09ac421e43fedd4cdfa1a29b984 (patch)
tree0f8dd7ae69fa91b443bf6ec883f498024ef3c15a /modules/comment
parent247e012c358a1acbbaa28bb850292ea8935886fb (diff)
downloadbrdo-c647b39c2c67c09ac421e43fedd4cdfa1a29b984.tar.gz
brdo-c647b39c2c67c09ac421e43fedd4cdfa1a29b984.tar.bz2
- Patch #37798 by Neil: fixed problem with node settings.
Diffstat (limited to 'modules/comment')
-rw-r--r--modules/comment/comment.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 6d9d0a500..94ba609a9 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -232,8 +232,8 @@ function comment_link($type, $node = 0, $main = 0) {
}
function comment_form_alter($form_id, &$form) {
- if (substr($form_id, -14) == '_node_settings') {
- $form['workflow']['comment_'. $node->type] = array('#type' => 'radios', '#title' => t('Default comment setting'), '#default_value' => variable_get('comment_'. $node->type, 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 (isset($form['type']) && $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.'));
}
}