Index: modules/forum.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum.module,v
retrieving revision 1.331
diff -u -p -r1.331 forum.module
--- modules/forum.module        18 May 2006 14:58:57 -0000      1.331
+++ modules/forum.module        27 May 2006 21:04:49 -0000
@@ -638,8 +638,13 @@ function _forum_parent_select($tid, $tit
 function forum_link_alter(&$node, &$links) {
   foreach ($links AS $module => $link) {
     if (strstr($module, 'taxonomy_term')) {
-      // Link back to the forum and not the taxonomy term page
-      $links[$module]['#href'] = str_replace('taxonomy/term', 'forum', $link['#href']);
+      // Link back to the forum and not the taxonomy term page. We'll only
+      // do this if the taxonomy term in question belongs to forums.
+      $tid = str_replace('taxonomy/term/', '', $link['#href']);
+      $term = taxonomy_get_term($tid);
+      if ($term->vid == _forum_get_vid()) {
+        $links[$module]['#href'] = str_replace('taxonomy/term', 'forum', $link['#href']);
+      }
     }
   }
 }