From 432f16d552d7546bf7411938b0af871d015c2e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= <gabor@hojtsy.hu> Date: Fri, 25 Jan 2008 21:39:26 +0000 Subject: [PATCH] #214058 by catch, Arancaytar: forum form alter was mistakenly dropping the parent field in all taxonomy forms --- modules/forum/forum.module | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 68632ea9b092..e57a73a4a425 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. -- GitLab