Index: modules/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy.module,v
retrieving revision 1.265
diff -u -r1.265 taxonomy.module
--- modules/taxonomy.module	11 Mar 2006 13:47:51 -0000	1.265
+++ modules/taxonomy.module	17 Mar 2006 22:45:02 -0000
@@ -205,32 +205,34 @@
     '#description' => t('A list of node types you want to associate with this vocabulary.'),
     '#required' => TRUE,
   );
-  $form['hierarchy'] = array('#type' => 'radios',
-    '#title' => t('Hierarchy'),
-    '#default_value' => $edit['hierarchy'],
-    '#options' => array(t('Disabled'), t('Single'), t('Multiple')),
-    '#description' => t('Allows <a href="%help-url">a tree-like hierarchy</a> between terms of this vocabulary.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'hierarchy'))),
-  );
-  $form['relations'] = array('#type' => 'checkbox',
-    '#title' => t('Related terms'),
-    '#default_value' => $edit['relations'],
-    '#description' => t('Allows <a href="%help-url">related terms</a> in this vocabulary.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'related-terms'))),
-  );
-  $form['tags'] = array('#type' => 'checkbox',
-    '#title' => t('Free tagging'),
-    '#default_value' => $edit['tags'],
-    '#description' => t('Content is categorized by typing terms instead of choosing from a list.'),
-  );
-  $form['multiple'] = array('#type' => 'checkbox',
-    '#title' => t('Multiple select'),
-    '#default_value' => $edit['multiple'],
-    '#description' => t('Allows nodes to have more than one term from this vocabulary (always true for free tagging).'),
-  );
-  $form['required'] = array('#type' => 'checkbox',
-    '#title' => t('Required'),
-    '#default_value' => $edit['required'],
-    '#description' => t('If enabled, every node <strong>must</strong> have at least one term in this vocabulary.'),
-  );
+  if (!in_array('forum', $edit['nodes'])) {
+    $form['hierarchy'] = array('#type' => 'radios',
+      '#title' => t('Hierarchy'),
+      '#default_value' => $edit['hierarchy'],
+      '#options' => array(t('Disabled'), t('Single'), t('Multiple')),
+      '#description' => t('Allows <a href="%help-url">a tree-like hierarchy</a> between terms of this vocabulary.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'hierarchy'))),
+    );
+    $form['relations'] = array('#type' => 'checkbox',
+      '#title' => t('Related terms'),
+      '#default_value' => $edit['relations'],
+      '#description' => t('Allows <a href="%help-url">related terms</a> in this vocabulary.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'related-terms'))),
+    );
+    $form['tags'] = array('#type' => 'checkbox',
+      '#title' => t('Free tagging'),
+      '#default_value' => $edit['tags'],
+      '#description' => t('Content is categorized by typing terms instead of choosing from a list.'),
+    );
+    $form['multiple'] = array('#type' => 'checkbox',
+      '#title' => t('Multiple select'),
+      '#default_value' => $edit['multiple'],
+      '#description' => t('Allows nodes to have more than one term from this vocabulary (always true for free tagging).'),
+    );
+    $form['required'] = array('#type' => 'checkbox',
+      '#title' => t('Required'),
+      '#default_value' => $edit['required'],
+      '#description' => t('If enabled, every node <strong>must</strong> have at least one term in this vocabulary.'),
+    );
+  }
   $form['weight'] = array('#type' => 'weight',
     '#title' => t('Weight'),
     '#default_value' => $edit['weight'],
@@ -260,6 +262,13 @@
 function taxonomy_form_vocabulary_submit($form_id, $form_values) {
   // Fix up the nodes array to remove unchecked nodes.
   $form_values['nodes'] = array_filter($form_values['nodes']);
+  if (in_array('forum', array_keys($form_values['nodes']))) {
+    $form_values['hierarchy'] = 1; //simple hierarchy
+    $form_values['relations'] = 0;
+    $form_values['tags'] = 0;
+    $form_values['multiple'] = 0; 
+    $form_values['required'] = 1;
+  }
   switch (taxonomy_save_vocabulary($form_values)) {
   case SAVED_NEW:
     drupal_set_message(t('Created new vocabulary %name.', array('%name' => theme('placeholder', $form_values['name']))));
