*** modules/forum/forum.module.orig	2011-09-27 21:13:46.000000000 +0800
--- modules/forum/forum.module	2011-09-27 21:21:35.015608940 +0800
***************
*** 581,601 ****
   * Implements hook_form_alter().
   */
  function forum_form_alter(&$form, $form_state, $form_id) {
!   $vid = variable_get('forum_nav_vocabulary', 0);
!   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(
!         '#markup' => t('This is the designated forum vocabulary. Some of the normal vocabulary options have been removed.'),
!         '#weight' => -1,
!       );
!       $form['hierarchy'] = array('#type' => 'value', '#value' => 1);
!       $form['delete']['#access'] = FALSE;
!     }
!     // Hide multiple parents select from forum terms.
!     elseif ($form_id == 'taxonomy_form_term') {
!       $form['advanced']['parent']['#access'] = FALSE;
!     }
    }
    if (!empty($form['#node_edit_form']) && isset($form['taxonomy_forums'])) {
      $langcode = $form['taxonomy_forums']['#language'];
--- 581,606 ----
   * Implements hook_form_alter().
   */
  function forum_form_alter(&$form, $form_state, $form_id) {
!   // Prevent the user from making changes to the vocab/term that would make it
!   // incompatible with how forum module works.
!   switch($form_id) {
!     case 'taxonomy_form_vocabulary':
!       $vid = variable_get('forum_nav_vocabulary', 0);
!       if (isset($form['vid']) && $form['vid']['#value'] == $vid) {
!         $form['help_forum_vocab'] = array(
!           '#markup' => t('This is the designated forum vocabulary. Some of the normal vocabulary options have been removed.'),
!           '#weight' => -1,
!         );
!         $form['hierarchy'] = array('#type' => 'value', '#value' => 1);
!         $form['delete']['#access'] = FALSE;
!       }
!       break;
!     case 'taxonomy_form_term':
!       $vid = variable_get('forum_nav_vocabulary', 0);
!       if (isset($form['vid']) && $form['vid']['#value'] == $vid) {
!         $form['advanced']['parent']['#access'] = FALSE;
!       }
!       break;
    }
    if (!empty($form['#node_edit_form']) && isset($form['taxonomy_forums'])) {
      $langcode = $form['taxonomy_forums']['#language'];
