Index: pathauto.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.module,v
retrieving revision 1.165
diff -u -p -r1.165 pathauto.module
--- pathauto.module	11 Oct 2010 01:04:03 -0000	1.165
+++ pathauto.module	20 Dec 2010 16:24:40 -0000
@@ -263,18 +263,14 @@ function pathauto_node_presave($node) {
  * Implements hook_node_insert().
  */
 function pathauto_node_insert($node) {
-  if (!isset($node->path['pathauto']) || !empty($node->path['pathauto'])) {
-    pathauto_node_update_alias($node, 'insert');
-  }
+  pathauto_node_update_alias($node, 'insert');
 }
 
 /**
  * Implements hook_node_update().
  */
 function pathauto_node_update($node) {
-  if (!isset($node->path['pathauto']) || !empty($node->path['pathauto'])) {
-    pathauto_node_update_alias($node, 'update');
-  }
+  pathauto_node_update_alias($node, 'update');
 }
 
 /**
@@ -379,6 +375,11 @@ function pathauto_node_operations() {
  *   An optional array of additional options.
  */
 function pathauto_node_update_alias(stdClass $node, $op, array $options = array()) {
+  // Skip processing if the user has disabled pathauto for the node.
+  if (isset($node->path['pathauto']) && empty($node->path['pathauto'])) {
+    return;
+  }
+
   // Skip processing if the term has no pattern.
   $language = isset($node->language) ? $node->language : LANGUAGE_NONE;
   if (!pathauto_pattern_load_by_entity('node', $node->type, $language)) {
@@ -421,14 +422,18 @@ function pathauto_node_update_alias_mult
  * Implements hook_taxonomy_term_insert().
  */
 function pathauto_taxonomy_term_insert($term) {
-  pathauto_taxonomy_term_update_alias($term, 'insert');
+  if (!isset($term->path['pathauto']) || !empty($term->path['pathauto'])) {
+    pathauto_taxonomy_term_update_alias($term, 'insert');
+  }
 }
 
 /**
  * Implements hook_taxonomy_term_update().
  */
 function pathauto_taxonomy_term_update($term) {
-  pathauto_taxonomy_term_update_alias($term, 'update', array('alias children' => TRUE));
+  if (!isset($term->path['pathauto']) || !empty($term->path['pathauto'])) {
+    pathauto_taxonomy_term_update_alias($term, 'update', array('alias children' => TRUE));
+  }
 }
 
 /**
@@ -449,6 +454,11 @@ function pathauto_taxonomy_term_delete($
  *   An optional array of additional options.
  */
 function pathauto_taxonomy_term_update_alias(stdClass $term, $op, array $options = array()) {
+  // Skip processing if the user has disabled pathauto for the term.
+  if (isset($term->path['pathauto']) && empty($term->path['pathauto'])) {
+    return;
+  }
+
   $options += array('alias children' => FALSE);
 
   $module = 'taxonomy';
@@ -568,6 +578,11 @@ function pathauto_user_operations() {
  *   An optional array of additional options.
  */
 function pathauto_user_update_alias(stdClass $account, $op, array $options = array()) {
+  // Skip processing if the user has disabled pathauto for the account.
+  if (isset($account->path['pathauto']) && empty($account->path['pathauto'])) {
+    return;
+  }
+
   $options += array('alias blog' => module_exists('blog'));
 
   // Skip processing if the account has no pattern.
