Index: includes/form.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/form.inc,v retrieving revision 1.493 diff -u -p -r1.493 form.inc --- includes/form.inc 16 Sep 2010 20:14:49 -0000 1.493 +++ includes/form.inc 19 Sep 2010 16:51:30 -0000 @@ -2610,21 +2610,20 @@ function weight_value(&$form) { function form_process_radios($element) { if (count($element['#options']) > 0) { foreach ($element['#options'] as $key => $choice) { - if (!isset($element[$key])) { - // Generate the parents as the autogenerator does, so we will have a - // unique id for each radio button. - $parents_for_id = array_merge($element['#parents'], array($key)); - $element[$key] = array( - '#type' => 'radio', - '#title' => $choice, - '#return_value' => check_plain($key), - '#default_value' => isset($element['#default_value']) ? $element['#default_value'] : NULL, - '#attributes' => $element['#attributes'], - '#parents' => $element['#parents'], - '#id' => drupal_html_id('edit-' . implode('-', $parents_for_id)), - '#ajax' => isset($element['#ajax']) ? $element['#ajax'] : NULL, - ); - } + $element += array($key => array()); + // Generate the parents as the autogenerator does, so we will have a + // unique id for each radio button. + $parents_for_id = array_merge($element['#parents'], array($key)); + $element[$key] += array( + '#type' => 'radio', + '#title' => $choice, + '#return_value' => check_plain($key), + '#default_value' => isset($element['#default_value']) ? $element['#default_value'] : NULL, + '#attributes' => $element['#attributes'], + '#parents' => $element['#parents'], + '#id' => drupal_html_id('edit-' . implode('-', $parents_for_id)), + '#ajax' => isset($element['#ajax']) ? $element['#ajax'] : NULL, + ); } } return $element; @@ -2708,17 +2707,16 @@ function form_process_checkboxes($elemen $element['#default_value'] = array(); } foreach ($element['#options'] as $key => $choice) { - if (!isset($element[$key])) { - $element[$key] = array( - '#type' => 'checkbox', - '#processed' => TRUE, - '#title' => $choice, - '#return_value' => $key, - '#default_value' => isset($value[$key]) ? $key : NULL, - '#attributes' => $element['#attributes'], - '#ajax' => isset($element['#ajax']) ? $element['#ajax'] : NULL, - ); - } + $element += array($key => array()); + $element[$key] += array( + '#type' => 'checkbox', + '#processed' => TRUE, + '#title' => $choice, + '#return_value' => $key, + '#default_value' => isset($value[$key]) ? $key : NULL, + '#attributes' => $element['#attributes'], + '#ajax' => isset($element['#ajax']) ? $element['#ajax'] : NULL, + ); } } return $element; Index: modules/comment/comment.module =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v retrieving revision 1.898 diff -u -p -r1.898 comment.module --- modules/comment/comment.module 13 Sep 2010 05:52:18 -0000 1.898 +++ modules/comment/comment.module 19 Sep 2010 16:57:29 -0000 @@ -1163,31 +1163,13 @@ function comment_form_node_form_alter(&$ COMMENT_NODE_HIDDEN => t('Hidden'), ), COMMENT_NODE_OPEN => array( - '#type' => 'radio', - '#title' => t('Open'), '#description' => t('Users with the "Post comments" permission can post comments.'), - '#return_value' => COMMENT_NODE_OPEN, - '#default_value' => $comment_settings, - '#id' => 'edit-comment-2', - '#parents' => array('comment'), ), COMMENT_NODE_CLOSED => array( - '#type' => 'radio', - '#title' => t('Closed'), '#description' => t('Users cannot post comments, but existing comments will be displayed.'), - '#return_value' => COMMENT_NODE_CLOSED, - '#default_value' => $comment_settings, - '#id' => 'edit-comment-1', - '#parents' => array('comment'), ), COMMENT_NODE_HIDDEN => array( - '#type' => 'radio', - '#title' => t('Hidden'), '#description' => t('Comments are hidden from view.'), - '#return_value' => COMMENT_NODE_HIDDEN, - '#default_value' => $comment_settings, - '#id' => 'edit-comment-0', - '#parents' => array('comment'), ), ); // If the node doesn't have any comments, the "hidden" option makes no