summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/forum/forum.module16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index 68632ea9b..e57a73a4a 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -353,10 +353,10 @@ function forum_taxonomy($op, $type, $term = NULL) {
* Implementation of hook_form_alter().
*/
function forum_form_alter(&$form, $form_state, $form_id) {
- // Hide critical options from forum vocabulary
- if ($form_id == 'taxonomy_form_vocabulary') {
- $vid = variable_get('forum_nav_vocabulary', '');
- if (isset($form['vid']) && $form['vid']['#value'] == $vid) {
+ $vid = variable_get('forum_nav_vocabulary', '');
+ if (isset($form['vid']) && $form['vid']['#value'] == $vid) {
+ // Hide critical options from forum vocabulary.
+ if ($form_id == 'taxonomy_form_vocabulary') {
$form['help_forum_vocab'] = array(
'#value' => t('This is the designated forum vocabulary. Some of the normal vocabulary options have been removed.'),
'#weight' => -1,
@@ -369,10 +369,10 @@ function forum_form_alter(&$form, $form_state, $form_id) {
$form['settings']['multiple'] = array('#type' => 'value', '#value' => FALSE);
unset($form['delete']);
}
- }
- // Hide multiple parents select from forum terms.
- if ($form_id == 'taxonomy_form_term') {
- unset($form['advanced']['parent']);
+ // Hide multiple parents select from forum terms.
+ elseif ($form_id == 'taxonomy_form_term') {
+ $form['advanced']['parent']['#access'] = FALSE;
+ }
}
if ($form_id == 'forum_node_form') {
// Make the vocabulary required for 'real' forum-nodes.