summaryrefslogtreecommitdiff
path: root/modules/comment
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2012-01-21 09:19:11 -0800
committerwebchick <webchick@24967.no-reply.drupal.org>2012-01-21 09:19:11 -0800
commita8737c296c129776305896f8a6f5f5f204532e60 (patch)
treea860d00fbd082d07ec2a08846468ec40a4089d18 /modules/comment
parent767d72d48ec1b641193a072a114d0cd1ca44faf0 (diff)
downloadbrdo-a8737c296c129776305896f8a6f5f5f204532e60.tar.gz
brdo-a8737c296c129776305896f8a6f5f5f204532e60.tar.bz2
Issue #1181750 by Everett Zufelt, sun: Fixed Removal of 'Hidden' option in comment settings form may break programmatic form submissions.
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 239cd5bec..3ec441075 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -1232,8 +1232,8 @@ function comment_form_node_form_alter(&$form, $form_state) {
// If the node doesn't have any comments, the "hidden" option makes no
// sense, so don't even bother presenting it to the user.
if (empty($comment_count)) {
- unset($form['comment_settings']['comment']['#options'][COMMENT_NODE_HIDDEN]);
- unset($form['comment_settings']['comment'][COMMENT_NODE_HIDDEN]);
+ $form['comment_settings']['comment'][COMMENT_NODE_HIDDEN]['#access'] = FALSE;
+ // Also adjust the description of the "closed" option.
$form['comment_settings']['comment'][COMMENT_NODE_CLOSED]['#description'] = t('Users cannot post comments.');
}
}