? patches
? pathauto.temp.inc
Index: pathauto.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.install,v
retrieving revision 1.25
diff -u -p -r1.25 pathauto.install
--- pathauto.install	29 Jul 2010 01:16:37 -0000	1.25
+++ pathauto.install	7 Aug 2010 21:02:35 -0000
@@ -128,6 +128,25 @@ function pathauto_update_7001() {
 }
 
 /**
+ * Update pathauto_taxonomy_[vid]_pattern variable names to
+ * pathauto_taxonomy_[machinename]_pattern.
+ */
+function pathauto_update_7002() {
+  if (module_exists('taxonomy')) {
+    $vocabularies = taxonomy_get_vocabularies();
+    foreach ($vocabularies as $vid => $vocabulary) {
+      if ($vid == variable_get('forum_nav_vocabulary', '')) {
+        // Skip the forum vocabulary.
+        continue;
+      }
+      $pattern = variable_get('pathauto_taxonomy_' . $vid . '_pattern');
+      variable_set('pathauto_taxonomy_' . $vocabulary->machine_name . '_pattern', $pattern);
+      variable_del('pathauto_taxonomy_' . $vid . '_pattern');
+    }
+  }
+}
+
+/**
  * Build a list of Drupal 6 tokens and their Drupal 7 token names.
  */
 function _pathauto_upgrade_token_list() {
Index: pathauto.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.module,v
retrieving revision 1.162
diff -u -p -r1.162 pathauto.module
--- pathauto.module	3 Aug 2010 02:30:48 -0000	1.162
+++ pathauto.module	7 Aug 2010 21:02:38 -0000
@@ -452,18 +452,29 @@ function pathauto_taxonomy_term_update_a
   $options += array('alias children' => FALSE);
 
   $module = 'taxonomy';
-  if (module_exists('forum') && $term->vid == variable_get('forum_nav_vocabulary', '')) {
-    $module = 'forum';
+  if ($term->vid == variable_get('forum_nav_vocabulary', '')) {
+    if (module_exists('forum')) {
+      $module = 'forum';
+    }
+    else {
+      return;
+    }
+  }
+
+  // Check that the term has its bundle, which is the vocabulary's machine name.
+  if (!isset($term->vocabulary_machine_name)) {
+    $vocabulary = taxonomy_vocabulary_load($term->vid);
+    $term->vocabulary_machine_name = $vocabulary->machine_name;
   }
 
   // Skip processing if the term has no pattern.
-  if (!pathauto_pattern_load_by_entity($module, $term->vid)) {
+  if (!pathauto_pattern_load_by_entity($module, $term->vocabulary_machine_name)) {
     return;
   }
 
   module_load_include('inc', 'pathauto');
   $uri = entity_uri('taxonomy_term', $term);
-  pathauto_create_alias($module, $op, $uri['path'], array('term' => $term), $term->vid);
+  pathauto_create_alias($module, $op, $uri['path'], array('term' => $term), $term->vocabulary_machine_name);
 
   if (!empty($options['alias children'])) {
     // For all children generate new alias.
Index: pathauto.pathauto.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.pathauto.inc,v
retrieving revision 1.3
diff -u -p -r1.3 pathauto.pathauto.inc
--- pathauto.pathauto.inc	29 Jul 2010 01:16:37 -0000	1.3
+++ pathauto.pathauto.inc	7 Aug 2010 21:02:38 -0000
@@ -142,15 +142,14 @@ function taxonomy_pathauto($op) {
       $settings['batch_file'] = drupal_get_path('module', 'pathauto') . '/pathauto.pathauto.inc';
 
       $vocabularies = taxonomy_get_vocabularies();
-      if (sizeof($vocabularies) > 0) {
+      if (count($vocabularies)) {
         $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;
+        foreach ($vocabularies as $vid => $vocabulary) {
+          if ($vid == variable_get('forum_nav_vocabulary', '')) {
+            // Skip the forum vocabulary.
+            continue;
           }
+          $settings['patternitems'][$vocabulary->machine_name] = t('Pattern for all %vocab-name paths', array('%vocab-name' => $vocabulary->name));
         }
       }
       return (object) $settings;
