Index: pathauto.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.inc,v
retrieving revision 1.42
diff -u -p -r1.42 pathauto.inc
--- pathauto.inc	30 May 2008 00:47:59 -0000	1.42
+++ pathauto.inc	4 Jun 2008 07:10:38 -0000
@@ -201,7 +201,6 @@ function pathauto_cleanstring($string, $
 
     // Replace multiple separators with a single one
     $output = preg_replace("/$seppattern+/", "$separator", $output);
-
   }
 
   // Enforce the maximum component length
@@ -243,20 +242,19 @@ function pathauto_create_alias($module, 
   }
 
   // Retrieve and apply the pattern for this content type
-  $pattern = '';
   if (!empty($type)) {
     if (!empty($language)) {
       $pattern = trim(variable_get('pathauto_'. $module .'_'. $type .'_'. $language .'_pattern', ''));
     }
-    if (!$pattern) {
+    if (empty($pattern)) {
       $pattern = trim(variable_get('pathauto_'. $module .'_'. $type .'_pattern', ''));
     }
   }
-  if (!$pattern) {
+  if (empty($pattern)) {
     $pattern = trim(variable_get('pathauto_'. $module .'_pattern', ''));
   }
   // No pattern? Do nothing (otherwise we may blow away existing aliases...)
-  if (!$pattern) {
+  if (empty($pattern)) {
     return '';
   }
 
Index: pathauto.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.module,v
retrieving revision 1.112
diff -u -p -r1.112 pathauto.module
--- pathauto.module	2 Jun 2008 18:55:12 -0000	1.112
+++ pathauto.module	4 Jun 2008 07:10:39 -0000
@@ -224,16 +224,16 @@ function pathauto_nodeapi(&$node, $op, $
       case 'update':
         // Get the specific pattern or the default
         if (!empty($node->language)) {
-          $pattern = variable_get('pathauto_node_'. $node->type .'_'. $node->language .'_pattern', FALSE);
+          $pattern = trim(variable_get('pathauto_node_'. $node->type .'_'. $node->language .'_pattern', ''));
         }
-        if (!trim($pattern)) {
-          $pattern = variable_get('pathauto_node_'. $node->type .'_pattern', FALSE);
-          if (!trim($pattern)) {
-            $pattern = variable_get('pathauto_node_pattern', FALSE);
+        if (empty($pattern)) {
+          $pattern = trim(variable_get('pathauto_node_'. $node->type .'_pattern', ''));
+          if (empty($pattern)) {
+            $pattern = trim(variable_get('pathauto_node_pattern', ''));
           }
         }
         // Only do work if there's a pattern
-        if ($pattern) {
+        if (!empty($pattern)) {
           // Only create an alias if the checkbox was not provided or if the checkbox was provided and is checked
           if (!isset($node->pathauto_perform_alias) || $node->pathauto_perform_alias) {
             $placeholders = pathauto_get_placeholders('node', $node);
@@ -265,16 +265,16 @@ function pathauto_form_alter(&$form, $fo
     // See if there is a pathauto pattern or default applicable
     if (isset($form['language'])) {
       $language = isset($form['language']['#value']) ? $form['language']['#value'] : $form['language']['#default_value'];
-      $pattern = variable_get('pathauto_node_'. $form['type']['#value'] .'_'. $language .'_pattern', FALSE);
+      $pattern = trim(variable_get('pathauto_node_'. $form['type']['#value'] .'_'. $language .'_pattern', ''));
     }
-    if (!trim($pattern)) {
-      $pattern = variable_get('pathauto_node_'. $form['type']['#value'] .'_pattern', FALSE);
-      if (!trim($pattern)) {
-        $pattern = variable_get('pathauto_node_pattern', FALSE);
+    if (empty($pattern)) {
+      $pattern = trim(variable_get('pathauto_node_'. $form['type']['#value'] .'_pattern', ''));
+      if (empty($pattern)) {
+        $pattern = trim(variable_get('pathauto_node_pattern', ''));
       }
     }
     // If there is a pattern AND the user is allowed to create aliases AND the path textbox is present on this form
-    if ($pattern && user_access('create url aliases') && isset($form['path']['path'])) {
+    if (!empty($pattern) && user_access('create url aliases') && isset($form['path']['path'])) {
       $output = t('An alias will be generated for you. If you wish to create your own alias below, untick this option.');
       if (user_access('administer pathauto')) {
         $output .= t(' To control the format of the generated aliases, see the <a href="@pathauto">Pathauto settings</a>.', array('@pathauto' => url('admin/build/path/pathauto')));
@@ -414,7 +414,6 @@ function pathauto_user($op, &$edit, &$us
       path_set_alias('blog/'. $user->uid .'/feed');
       path_set_alias('user/'. $user->uid .'/track');
       path_set_alias('user/'. $user->uid .'/track/feed');
-
       break;
     default:
       break;
Index: pathauto_node.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto_node.inc,v
retrieving revision 1.45
diff -u -p -r1.45 pathauto_node.inc
--- pathauto_node.inc	28 May 2008 16:04:35 -0000	1.45
+++ pathauto_node.inc	4 Jun 2008 07:10:39 -0000
@@ -52,7 +52,6 @@ function node_pathauto($op) {
  * Generate aliases for all nodes without aliases.
  */
 function node_pathauto_bulkupdate() {
-
   // From all node types, only attempt to update those with patterns
   $pattern_types = array();
 
Index: pathauto_taxonomy.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto_taxonomy.inc,v
retrieving revision 1.38
diff -u -p -r1.38 pathauto_taxonomy.inc
--- pathauto_taxonomy.inc	31 May 2008 07:03:06 -0000	1.38
+++ pathauto_taxonomy.inc	4 Jun 2008 07:10:39 -0000
@@ -56,20 +56,18 @@ function taxonomy_pathauto($op) {
 function taxonomy_pathauto_bulkupdate() {
   // From all node types, only attempt to update those with patterns
   $pattern_vids = array();
-  $vid_where = '';
   foreach (taxonomy_get_vocabularies() as $vid => $info) {
-    $pattern = '';
-    $pattern = variable_get('pathauto_taxonomy_'. $vid .'_pattern', '');
+    $pattern = trim(variable_get('pathauto_taxonomy_'. $vid .'_pattern', ''));
 
     // If it's not set, check the default
     // TODO - if there's a default we shouldn't do this crazy where statement because all vocabs get aliases
     // TODO - special casing to exclude the forum vid (and the images vid and...?)
-    if (!trim($pattern)) {
-      $pattern = variable_get('pathauto_taxonomy_pattern', '');
+    if (empty($pattern)) {
+      $pattern = trim(variable_get('pathauto_taxonomy_pattern', ''));
     }
-    if (trim($pattern)) {
+    if (!empty($pattern)) {
       $pattern_vids[] = $vid;
-      if (!trim($vid_where)) {
+      if (empty($vid_where)) {
         $vid_where = " AND (vid = '%s' ";
       }
       else {
