Index: pathauto.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.module,v
retrieving revision 1.44.4.47
diff -u -r1.44.4.47 pathauto.module
--- pathauto.module	5 Nov 2007 12:53:58 -0000	1.44.4.47
+++ pathauto.module	11 Nov 2007 04:08:02 -0000
@@ -596,7 +596,7 @@
           //If the category is deleted, remove the path aliases
           $category = (object) $object;
           path_set_alias('taxonomy/term/'. $category->tid);
-          path_set_alias('forum/'. $category->tid);
+          path_set_alias(taxonomy_term_path($category));
           path_set_alias('taxonomy/term/'. $category->tid .'/0/feed');
           break;
         default:
Index: pathauto.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.inc,v
retrieving revision 1.1.2.16
diff -u -r1.1.2.16 pathauto.inc
--- pathauto.inc	5 Nov 2007 12:55:02 -0000	1.1.2.16
+++ pathauto.inc	11 Nov 2007 04:08:00 -0000
@@ -187,6 +187,10 @@
   if (!trim($pattern)) {
     $pattern = drupal_strtolower(variable_get('pathauto_'. $module .'_pattern', ''));
   }
+  if ($module == 'dummy_taxonomy' && is_numeric($type)) {
+    $pattern = $src;
+    $src = 'taxonomy/term/'.$type;
+  }
   
   // No pattern? Do nothing (otherwise we may blow away existing aliases...)
   if (!trim($pattern)) {
@@ -255,11 +259,14 @@
   // by the module
   if (variable_get('pathauto_'. $module .'_applytofeeds', FALSE)) {
     $feedappend = variable_get('pathauto_'. $module .'_supportsfeeds', '');
-    // If we're in a forum, the src doesn't form the base of the rss feed
-    // TODO refactor this out
-    if ($module == 'forum') {
+    // In taxonomies the src doesn't have to form the base of the rss feed
+    if ($module == 'taxonomy') {
       $pieces = explode('/', $src);
-      $tid = $pieces[1];
+      $index = 0;
+      while (!is_numeric($pieces[$index])) {
+        $index++;
+      }
+      $tid = $pieces[$index];
       _pathauto_set_alias("taxonomy/term/$tid/$feedappend", "$alias/feed", NULL, $verbose);
     }
     else {
Index: pathauto_taxonomy.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto_taxonomy.inc,v
retrieving revision 1.20.4.16
diff -u -r1.20.4.16 pathauto_taxonomy.inc
--- pathauto_taxonomy.inc	25 Oct 2007 17:18:57 -0000	1.20.4.16
+++ pathauto_taxonomy.inc	11 Nov 2007 04:08:02 -0000
@@ -28,13 +28,10 @@
       $vocabularies = taxonomy_get_vocabularies();
       if (sizeof($vocabularies) > 0) {
         $settings['patternitems'] = array();
-        $forum_vid = variable_get('forum_nav_vocabulary', '');
         foreach ($vocabularies as $vocab) {
-          if ($vocab->vid != $forum_vid) {
-            $vocabname = $vocab->name;
-            $fieldlabel = t('Pattern for all %vocab-name paths', array('%vocab-name' => $vocabname));
-            $settings['patternitems'][$vocab->vid] = $fieldlabel;
-          }
+          $vocabname = $vocab->name;
+          $fieldlabel = t('Pattern for all %vocab-name paths', array('%vocab-name' => $vocabname));
+          $settings['patternitems'][$vocab->vid] = $fieldlabel;
         }
       }
       return (object) $settings;
@@ -48,14 +45,13 @@
  * 
  */ 
 function taxonomy_pathauto_bulkupdate() {
-  $forum_vid = variable_get('forum_nav_vocabulary', '');
-  $query = "SELECT tid, vid, name, src, dst FROM {term_data} LEFT JOIN {url_alias} ON CONCAT('taxonomy/term/', tid) = src WHERE src IS NULL AND vid != %d";
-  $result = db_query_range($query, $forum_vid, 0, variable_get('pathauto_max_bulk_update', 50));
+  $query = "SELECT tid, vid, name, src, dst FROM {term_data} LEFT JOIN {url_alias} ON CONCAT('taxonomy/term/', tid) = src WHERE src IS NULL";
+  $result = db_query_range($query, 0, variable_get('pathauto_max_bulk_update', 50));
   
   $count = 0;
   $placeholders = array();
   while ($category = db_fetch_object($result)) {
-    $count = _taxonomy_pathauto_alias($category, 'bulkupdate') + $count;
+    $count += _taxonomy_pathauto_alias($category, 'bulkupdate');
   }
   
   drupal_set_message(format_plural($count,
@@ -75,69 +71,14 @@
 
   $placeholders = pathauto_get_placeholders('taxonomy', $category);    
   
-  $forum_vid = variable_get('forum_nav_vocabulary', '');
-  // If we're in a forum vocabulary, also create a forum container, forum, or forum topic alias.
-  if (module_exists('forum') && $forum_vid == (int)$category->vid) {
-    $src = 'forum/'. $category->tid;
-    if ($alias = pathauto_create_alias('forum', $op, $placeholders, $src, $vid)) {
-      $count++;
-    }
+  $src = taxonomy_term_path($category);
+  if ($alias = pathauto_create_alias('taxonomy', $op, $placeholders, $src, $category->vid)) {
+    $count++;
+  }
+  if ($src != 'taxonomy/term/'.$category->tid) {
+    // We have to create dummy alias for taxonomy/term/$tid to exclude term from bulkupdate 
+    $alias = pathauto_create_alias('dummy_taxonomy', $op, $placeholders, $src, $category->tid);
   }
-  else {
-    $src = 'taxonomy/term/'. $category->tid;
-    if ($alias = pathauto_create_alias('taxonomy', $op, $placeholders, $src, $category->vid)) {
-      $count++;
-    }
-  }
-  return $count;
-}
 
-
-/*
- * Implementation of hook_pathauto() for forum module
- */
-function forum_pathauto($op) {
-  switch ($op) {
-    case 'settings':
-      $settings = array();
-      $settings['module'] = 'forum';
-      $settings['token_type'] = 'taxonomy';
-      $settings['groupheader'] = t('Forum path settings');
-      $settings['patterndescr'] = t('Pattern for forums and forum containers');
-      $settings['patterndefault'] = t('[vocab-raw]/[catpath-raw]');
-      $patterns = token_get_list('taxonomy');
-      foreach ($patterns as $type => $pattern_set) {
-        if ($type != 'global') {
-          foreach ($pattern_set as $pattern => $description) {
-            $settings['placeholders'][t('['. $pattern .']')] = t($description);
-          }
-        }
-      }
-      $settings['supportsfeeds'] = '0/feed';
-      $settings['bulkname'] = t('Bulk generate forum paths');
-      $settings['bulkdescr'] = t('Generate aliases for all existing forums and forum containers which do not already have aliases.');
-      return (object) $settings;
-    default:
-      break;
-  }
+  return $count;
 }
-
-
-/**
- *  Generate aliases for all forums and forum containers without aliases
- */
-function forum_pathauto_bulkupdate() {
-  $forum_vid = variable_get('forum_nav_vocabulary', '');
-  $query = "SELECT tid, vid, name, src, dst FROM {term_data} LEFT JOIN {url_alias} ON CONCAT('forum/', tid) = src WHERE vid = %d AND src IS NULL";
-  $result = db_query_range($query, $forum_vid, 0, variable_get('pathauto_max_bulk_update', 50));
-
-  $count = 0;
-  $placeholders = array();
-  while ($category = db_fetch_object($result)) {
-    $count = _taxonomy_pathauto_alias($category, 'bulkupdate') + $count;
-  }
-
-  drupal_set_message(format_plural($count,
-    "Bulk update of forums and forum containers completed, one alias generated.",
-    "Bulk update of forums and forum containers completed, @count aliases generated."));
-}
\ No newline at end of file
