Index: modules/forum/forum.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v
retrieving revision 1.400
diff -u -p -r1.400 forum.module
--- modules/forum/forum.module	30 May 2007 08:04:38 -0000	1.400
+++ modules/forum/forum.module	1 Jun 2007 12:09:53 -0000
@@ -318,7 +318,7 @@ function forum_block($op = 'list', $delt
  */
 function forum_view(&$node, $teaser = FALSE, $page = FALSE) {
   if ($page) {
-    $vocabulary = taxonomy_vocabulary_load(variable_get('forum_nav_vocabulary', ''));
+    $vocabulary = taxonomy_vocabulary_load(_forum_get_vid());
     // Breadcrumb navigation
     $breadcrumb = array();
     $breadcrumb[] = array('path' => 'forum', 'title' => $vocabulary->name);
@@ -348,7 +348,7 @@ function forum_view(&$node, $teaser = FA
  * Check in particular that only a "leaf" term in the associated taxonomy
  * vocabulary is selected, not a "container" term.
  */
-function forum_submit(&$form_values) {
+function forum_submit($form, &$form_state, $form_values) {
   // Make sure all fields are set properly:
   $form_values['icon'] = !empty($form_values['icon']) ? $form_values['icon'] : '';
 
@@ -373,6 +373,7 @@ function forum_submit(&$form_values) {
       }
     }
   }
+  $form_state['values'] = $form_values;
 }
 
 /**
@@ -384,7 +385,7 @@ function forum_submit(&$form_values) {
 function forum_validate($node) {
   if ($node->taxonomy) {
     // Extract the node's proper topic ID.
-    $vocabulary = variable_get('forum_nav_vocabulary', '');
+    $vocabulary = _forum_get_vid();
     $containers = variable_get('forum_containers', array());
     foreach ($node->taxonomy as $term) {
       if (db_result(db_query('SELECT COUNT(*) FROM {term_data} WHERE tid = %d AND vid = %d', $term, $vocabulary))) {
@@ -503,7 +504,6 @@ function forum_form_container($edit = ar
     $form['tid'] = array('#type' => 'value', '#value' => $edit['tid']);
   }
   $form['#submit'][] = 'forum_form_submit';
-  $form['#validate'][] = 'forum_form_validate';
   $form['#theme'] = 'forum_form';
 
   return $form;
@@ -562,7 +562,6 @@ function forum_form_forum($edit = array(
     $form['tid'] = array('#type' => 'hidden', '#value' => $edit['tid']);
   }
   $form['#submit'][] = 'forum_form_submit';
-  $form['#validate'][] = 'forum_form_validate';
   $form['#theme'] = 'forum_form';
 
   return $form;
@@ -759,7 +758,7 @@ function _forum_format($topic) {
 function forum_get_forums($tid = 0) {
 
   $forums = array();
-  $_forums = taxonomy_get_tree(variable_get('forum_nav_vocabulary', ''), $tid);
+  $_forums = taxonomy_get_tree(_forum_get_vid(), $tid);
 
   if (count($_forums)) {
 
@@ -916,7 +915,7 @@ function theme_forum_display($forums, $t
   global $user;
   // forum list, topics list, topic browser and 'add new topic' link
 
-  $vocabulary = taxonomy_vocabulary_load(variable_get('forum_nav_vocabulary', ''));
+  $vocabulary = taxonomy_vocabulary_load(_forum_get_vid());
   $title = !empty($vocabulary->name) ? $vocabulary->name : '';
 
   // Breadcrumb navigation:
@@ -1186,4 +1185,3 @@ function _forum_get_topic_order_sql($sor
   return $order['field'] .' '. $order['sort'];
 }
 
-
