? patches
? pathauto.temp.inc
? pathauto.tokens.inc
? subpathauto
Index: pathauto.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.inc,v
retrieving revision 1.94
diff -u -p -r1.94 pathauto.inc
--- pathauto.inc	20 Dec 2010 17:55:21 -0000	1.94
+++ pathauto.inc	20 Dec 2010 18:38:52 -0000
@@ -397,8 +397,8 @@ function pathauto_create_alias($module, 
   // Also create a related feed alias if requested and supported.
   $feedappend = trim(variable_get('pathauto_' . $module . '_applytofeeds', ''));
   if (drupal_strlen($feedappend)) {
-    // For forums and taxonomies, the source doesn't always form the base of the RSS feed (i.e. image galleries)
-    if (($module == 'taxonomy_term' || $module == 'forum') && !empty($data['term'])) {
+    // For taxonomies, the source doesn't always form the base of the RSS feed (e.g. forums).
+    if ($module == 'taxonomy_term' && !empty($data['term'])) {
       $source = 'taxonomy/term/' . $data['term']->tid;
     }
 
Index: pathauto.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.install,v
retrieving revision 1.27
diff -u -p -r1.27 pathauto.install
--- pathauto.install	20 Dec 2010 17:55:21 -0000	1.27
+++ pathauto.install	20 Dec 2010 18:38:52 -0000
@@ -14,8 +14,7 @@
 function pathauto_install() {
   // Set some default variables necessary for the module to perform.
   variable_set('pathauto_node_pattern', 'content/[node:title]');
-  variable_set('pathauto_taxonomy_pattern', '[term:vocabulary]/[term:name]');
-  variable_set('pathauto_forum_pattern', '[term:vocabulary]/[term:name]');
+  variable_set('pathauto_taxonomy_term_pattern', '[term:vocabulary]/[term:name]');
   variable_set('pathauto_user_pattern', 'users/[user:name]');
   variable_set('pathauto_blog_pattern', 'blogs/[user:name]');
 
@@ -40,47 +39,6 @@ function pathauto_uninstall() {
 }
 
 /**
- * Set the weight a little heavier to allow taxonomy to do its work.
- */
-function pathauto_update_1() {
-  db_update('system')
-    ->fields(array('weight' => 1))
-    ->condition('type', 'module')
-    ->condition('name', 'pathauto')
-    ->execute();
-}
-
-/**
- * pathauto_update_4 was a backport of a feature which is in core of Drupal 6
- * hence it is removed from the 6.x branch even though the goal is to support
- * Pathauto 5.x-1.x -> 6.x-2.x upgrades.
- */
-
-/**
- * Delete the pathauto_node_supportsfeeds.
- */
-function pathauto_update_3() {
-  // Do nothing, this update was a mistake
-}
-
-/**
- * New style naming for the punctuation chars.
- */
-function pathauto_update_4() {
-  variable_set('pathauto_punctuation_quotes', variable_get('pathauto_quotes', 0));
-  variable_del('pathauto_quotes');
-}
-
-/**
- * Remove the url_alias_extra table which wasn't used.
- */
-function pathauto_update_7() {
-  if (db_table_exists('url_alias_extra')) {
-    db_drop_table('url_alias_extra');
-  }
-}
-
-/**
  * Remove the unsupported user/%/contact and user/%/tracker pattern variables.
  */
 function pathauto_update_6200() {
@@ -101,6 +59,12 @@ function pathauto_update_6201() {
 }
 
 /**
+ * Empty update since it is handled by pathauto_update_7004().
+ */
+function pathauto_update_6202() {
+}
+
+/**
  * Remove obsolete variables since batch API is now used.
  */
 function pathauto_update_7000() {
@@ -160,6 +124,21 @@ function pathauto_update_7003() {
 }
 
 /**
+ * Merge forum settings back into taxonomy term settings.
+ */
+function pathauto_update_7004() {
+  $vid = variable_get('forum_nav_vocabulary', '');
+  if ($vid && $vocabulary = taxonomy_vocabulary_load($vid)) {
+    $pattern = variable_get('pathauto_forum_pattern', '');
+    variable_set("pathauto_taxonomy_term_{$vocabulary->machine_name}_pattern", $pattern);
+  }
+
+  variable_del('pathauto_forum_pattern');
+  variable_del('pathauto_forum_applytofeeds');
+  variable_del('pathauto_forum_supportsfeeds');
+}
+
+/**
  * 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.167
diff -u -p -r1.167 pathauto.module
--- pathauto.module	20 Dec 2010 18:02:07 -0000	1.167
+++ pathauto.module	20 Dec 2010 18:38:52 -0000
@@ -40,7 +40,7 @@ function pathauto_hook_info() {
 function pathauto_module_implements_alter(&$implementations, $hook) {
   $hooks = pathauto_hook_info();
   if (isset($hooks[$hook])) {
-    $modules = array('node', 'taxonomy', 'user', 'forum', 'blog');
+    $modules = array('node', 'taxonomy', 'user', 'blog');
     foreach ($modules as $module) {
       if (module_exists($module)) {
         $implementations[$module] = TRUE;
@@ -407,7 +407,7 @@ function pathauto_node_update_alias(stdC
     return;
   }
 
-  // Skip processing if the term has no pattern.
+  // Skip processing if the node has no pattern.
   $language = isset($node->language) ? $node->language : LANGUAGE_NONE;
   if (!pathauto_pattern_load_by_entity('node', $node->type, $language)) {
     return;
@@ -484,16 +484,6 @@ function pathauto_taxonomy_term_update_a
 
   $options += array('alias children' => FALSE);
 
-  $module = 'taxonomy_term';
-  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);
@@ -501,13 +491,13 @@ function pathauto_taxonomy_term_update_a
   }
 
   // Skip processing if the term has no pattern.
-  if (!pathauto_pattern_load_by_entity($module, $term->vocabulary_machine_name)) {
+  if (!pathauto_pattern_load_by_entity('taxonomy_term', $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->vocabulary_machine_name);
+  pathauto_create_alias('taxonomy_term', $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.5
diff -u -p -r1.5 pathauto.pathauto.inc
--- pathauto.pathauto.inc	20 Dec 2010 17:55:21 -0000	1.5
+++ pathauto.pathauto.inc	20 Dec 2010 18:38:53 -0000
@@ -145,10 +145,6 @@ function taxonomy_pathauto($op) {
       if (count($vocabularies)) {
         $settings['patternitems'] = array();
         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));
         }
       }
@@ -172,10 +168,6 @@ function taxonomy_pathauto_bulk_update_b
   $query->leftJoin('url_alias', 'ua', "$concat = ua.source");
   $query->addField('td', 'tid');
   $query->isNull('ua.source');
-  // Exclude the forums terms.
-  if ($forum_vid = variable_get('forum_nav_vocabulary', '')) {
-    $query->condition('td.vid', $forum_vid, '<>');
-  }
   $query->orderBy('td.tid');
   $query->addTag('pathauto_bulk_update');
   $query->addMetaData('entity', 'taxonomy_term');
@@ -205,70 +197,6 @@ function taxonomy_pathauto_bulk_update_b
 }
 
 /**
- * Implements hook_pathauto() for forum module.
- */
-function forum_pathauto($op) {
-  switch ($op) {
-    case 'settings':
-      $settings = array();
-      $settings['module'] = 'forum';
-      $settings['token_type'] = 'term';
-      $settings['groupheader'] = t('Forum paths');
-      $settings['patterndescr'] = t('Pattern for forums and forum containers');
-      $settings['patterndefault'] = '[term:vocabulary]/[term:name]';
-      $settings['supportsfeeds'] = 'feed';
-      $settings['batch_update_callback'] = 'forum_pathauto_bulk_update_batch_process';
-      $settings['batch_file'] = drupal_get_path('module', 'pathauto') . '/pathauto.pathauto.inc';
-      return (object) $settings;
-    default:
-      break;
-  }
-}
-
-/**
- * Batch processing callback; Generate aliases for forums.
- */
-function forum_pathauto_bulk_update_batch_process(&$context) {
-  if (!isset($context['sandbox']['current'])) {
-    $context['sandbox']['count'] = 0;
-    $context['sandbox']['current'] = 0;
-  }
-
-  $query = db_select('taxonomy_term_data', 'td');
-  $concat = _pathauto_sql_concat("'forum/'", 'td.tid');
-  $query->leftJoin('url_alias', 'ua', "$concat = ua.source");
-  $query->addField('td', 'tid');
-  $query->isNull('ua.source');
-  $query->condition('vid', variable_get('forum_nav_vocabulary', ''));
-  $query->orderBy('td.tid');
-  $query->addTag('pathauto_bulk_update');
-  $query->addMetaData('entity', 'taxonomy_term');
-
-  // Get the total amount of items to process.
-  if (!isset($context['sandbox']['total'])) {
-    $context['sandbox']['total'] = $query->countQuery()->execute()->fetchField();
-
-    // If there are no nodes to update, the stop immediately.
-    if (!$context['sandbox']['total']) {
-      $context['finished'] = 1;
-      return;
-    }
-  }
-
-  $query->range(0, 25);
-  $tids = $query->execute()->fetchCol();
-
-  pathauto_taxonomy_term_update_alias_multiple($tids, 'bulkupdate');
-  $context['sandbox']['count'] += count($tids);
-  $context['sandbox']['current'] = max($tids);
-  $context['message'] = t('Updated alias for fourm @tid.', array('@tid' => end($tids)));
-
-  if ($context['sandbox']['count'] != $context['sandbox']['total']) {
-    $context['finished'] = $context['sandbox']['count'] / $context['sandbox']['total'];
-  }
-}
-
-/**
  * Implements hook_pathauto().
  */
 function user_pathauto($op) {
