--- pathauto_node.inc	2007-09-02 08:41:33.000000000 -0400
+++ pathauto_node-fix.inc	2007-09-30 12:59:46.000000000 -0400
@@ -40,38 +40,15 @@ function node_pathauto($op) {
  */
 function node_pathauto_bulkupdate() {
 
-  // From all node types, only attempt to update those with patterns
-  $pattern_types = array();
-  $type_where = '';
-  foreach (node_get_types() as $type => $info) {
-    $pattern = '';
-    $pattern = variable_get('pathauto_node_'. $type .'_pattern', '');
-
-    // If it's not set, check the default
-    if (!trim($pattern)) {
-      $pattern = drupal_strtolower(variable_get('pathauto_node_pattern', ''));
-    }
-    if (trim($pattern)) {
-      $pattern_types[] = $type;
-      if (!trim($type_where)) {
-        $type_where = " AND (type = '%s' ";
-      }
-      else {
-        $type_where .= " OR type = '%s'";
-      }
-    }
-  }
-  $type_where .= ')';
-
-  $query = "SELECT nid, type, title, uid, created, src, dst, vid FROM {node} LEFT JOIN {url_alias} ON CONCAT('node/', nid) = src WHERE src IS NULL ". $type_where;
-  $result = db_query_range($query, $pattern_types, 0, variable_get('pathauto_max_bulk_update', 50));
+  $query = "SELECT nid FROM {node} WHERE CONCAT('node/', nid) NOT IN (SELECT src FROM {url_alias}) ";
+  $result = db_query_range($query, array(), 0, variable_get('pathauto_max_bulk_update', 50));
 
   $count = 0;
   $placeholders = array();
   while ($node_ref = db_fetch_object($result)) {
     $node = node_load($node_ref->nid, NULL, TRUE);
-    $node->src = $node_ref->src;
-    $node->dst = $node_ref->dst;
+    $node->src = NULL;
+    $node->dst = NULL;
     if (module_exists('taxonomy')) {
         // Must populate the terms for the node here for the category
         // placeholders to work
