Index: pathauto.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.inc,v
retrieving revision 1.43
diff -u -p -r1.43 pathauto.inc
--- pathauto.inc	8 Jun 2008 23:58:58 -0000	1.43
+++ pathauto.inc	9 Jun 2008 09:32:46 -0000
@@ -69,7 +69,7 @@ function _pathauto_alias_exists($alias, 
   if (db_table_exists('path_redirect')) {
     $redirect_rid = db_result(db_query_range("SELECT rid FROM {path_redirect} WHERE path = '%s'", $alias, 0, 1));
   }
-  if ($alias_pid || (isset($redirect_rid) && $redirect_rid)) {
+  if ($alias_pid || !empty($redirect_rid)) {
     return TRUE;
   }
   else {
@@ -128,10 +128,9 @@ function _pathauto_existing_alias_data($
 function pathauto_cleanstring($string, $clean_slash = TRUE) {
   // Default words to ignore
   $ignore_words = array(
-    'a', 'an', 'as', 'at', 'before', 'but', 'by', 'for', 'from',
-    'is', 'in', 'into', 'like', 'of', 'off', 'on', 'onto', 'per',
-    'since', 'than', 'the', 'this', 'that', 'to', 'up', 'via',
-    'with',
+    'a', 'an', 'as', 'at', 'before', 'but', 'by', 'for', 'from', 'is', 'in',
+    'into', 'like', 'of', 'off', 'on', 'onto', 'per', 'since', 'than', 'the',
+    'this', 'that', 'to', 'up', 'via', 'with',
   );
 
   // Replace or drop punctuation based on user settings
@@ -175,7 +174,7 @@ function pathauto_cleanstring($string, $
   }
 
   // Get rid of words that are on the ignore list
-  $ignore_re = "\b". preg_replace('/,/', "\b|\b", variable_get('pathauto_ignore_words', $ignore_words)) ."\b";
+  $ignore_re = '\b'. preg_replace('/,/', '\b|\b', variable_get('pathauto_ignore_words', $ignore_words)) .'\b';
 
   if (function_exists('mb_eregi_replace')) {
     $output = mb_eregi_replace($ignore_re, '', $output);
@@ -185,7 +184,7 @@ function pathauto_cleanstring($string, $
   }
 
   // Always replace whitespace with the separator.
-  $output = preg_replace("/\s+/", $separator, $output);
+  $output = preg_replace('/\s+/', $separator, $output);
 
   // In preparation for pattern matching,
   // escape the separator if and only if it is not alphanumeric.
@@ -201,7 +200,6 @@ function pathauto_cleanstring($string, $
 
     // Replace multiple separators with a single one
     $output = preg_replace("/$seppattern+/", "$separator", $output);
-
   }
 
   // Enforce the maximum component length
@@ -243,18 +241,17 @@ function pathauto_create_alias($module, 
   }
 
   // Retrieve and apply the pattern for this content type
-  $pattern = '';
   if (!empty($type)) {
     $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 '';
   }
 
@@ -292,10 +289,10 @@ function pathauto_create_alias($module, 
   }
 
   // Two or more slashes should be collapsed into one
-  $alias = preg_replace("/\/+/", '/', $alias);
+  $alias = preg_replace('/\/+/', '/', $alias);
 
   // Trim any leading or trailing slashes
-  $alias = preg_replace("/^\/|\/+$/", '', $alias);
+  $alias = preg_replace('/^\/|\/+$/', '', $alias);
 
   $maxlength = min(variable_get('pathauto_max_length', 100), 128);
   $alias = drupal_substr($alias, 0, $maxlength);
@@ -376,14 +373,14 @@ function _pathauto_path_is_callback($pat
 function _pathauto_set_alias($src, $dst, $entity_type, $entity_id, $pid = NULL, $verbose = FALSE, $old_alias = NULL, $language = '') {
   // Alert users that an existing callback cannot be overridden automatically
   if (_pathauto_path_is_callback($dst)) {
-    if ($verbose and user_access('notify of path changes')) {
+    if ($verbose && user_access('notify of path changes')) {
       drupal_set_message(t('Ignoring alias %dst due to existing path conflict.', array('%dst' => $dst)));
     }
     return;
   }
   // Alert users if they are trying to create an alias that is the same as the internal path
   if ($src == $dst) {
-    if ($verbose and user_access('notify of path changes')) {
+    if ($verbose && user_access('notify of path changes')) {
       drupal_set_message(t('Ignoring alias %dst because it is the same as the internal path.', array('%dst' => $dst)));
     }
     return;
@@ -402,8 +399,8 @@ function _pathauto_set_alias($src, $dst,
         $redirect = TRUE;
       }
     }
-    if ($verbose and user_access('notify of path changes')) {
-      if (isset($redirect) && $redirect) {
+    if ($verbose && user_access('notify of path changes')) {
+      if (!empty($redirect)) {
         drupal_set_message(t('Created new alias %dst for %src, replacing %old_alias. %old_alias now redirects to %dst', array('%dst' => $dst, '%src' => $src, '%old_alias' => $old_alias)));
       }
       elseif ($pid) {
@@ -472,7 +469,7 @@ function pathauto_clean_token_values($fu
 function pathauto_punctuation_chars() {
   $punctuation = array();
 
-  // Handle " ' , . - _ : ; | { { } ] + = * & % $ � # @ ! ~ ( ) ? < > \ � �
+  // Handle " ' ` , . - _ : ; | { [ } ] + = * & % ^ $ # @ ! ~ ( ) ? < > \
   $punctuation['double_quotes']      = array('value' => '"', 'name' => t('Double quotes "'));
   $punctuation['quotes']             = array('value' => "'", 'name' => t("Single quotes (apostrophe) '"));
   $punctuation['backtick']           = array('value' => '`', 'name' => t('Back tick `'));
Index: pathauto.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.module,v
retrieving revision 1.113
diff -u -p -r1.113 pathauto.module
--- pathauto.module	8 Jun 2008 23:58:58 -0000	1.113
+++ pathauto.module	9 Jun 2008 09:32:46 -0000
@@ -193,7 +193,6 @@ function pathauto_path_alias_types() {
   if (module_exists('forum')) {
     $objects['forum/%'] = t('forums');
   }
-
   return $objects;
 }
 
@@ -209,8 +208,8 @@ function pathauto_nodeapi(&$node, $op, $
     switch ($op) {
       case 'presave':
         // About to be saved (before insert/update)
-        if (isset($node->pathauto_perform_alias) && isset($node->old_alias)
-            && $node->pathauto_perform_alias && $node->path == '' && $node->old_alias != '') {
+        if (!empty($node->pathauto_perform_alias) && isset($node->old_alias)
+            && $node->path == '' && $node->old_alias != '') {
           /**
            * There was an old alias, but when pathauto_perform_alias was checked
            * the javascript disabled the textbox which led to an empty value being
@@ -223,14 +222,13 @@ function pathauto_nodeapi(&$node, $op, $
       case 'insert':
       case 'update':
         // Get the specific pattern or the default
-        $pattern = FALSE;
         if (variable_get('language_content_type_'. $node->type, 0)) {
-          $pattern = variable_get('pathauto_node_'. $node->type .'_'. $node->language .'_pattern', FALSE);
+          $pattern = trim(variable_get('pathauto_node_'. $node->type .'_'. $node->language .'_pattern', FALSE));
         }
-        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', FALSE));
+          if (empty($pattern)) {
+            $pattern = trim(variable_get('pathauto_node_pattern', FALSE));
           }
         }
         // Only do work if there's a pattern
@@ -266,16 +264,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')));
@@ -388,7 +386,7 @@ function pathauto_user($op, &$edit, &$us
 
         if (module_exists('blog')) {
           $new_user = $user;
-          $new_user->roles = isset($edit['roles']) ? $edit['roles']: array();
+          $new_user->roles = isset($edit['roles']) ? $edit['roles'] : array();
           $new_user->roles[DRUPAL_AUTHENTICATED_RID] = 'authenticated user'; // Add this back
           if (user_access('create blog entries', $new_user)) {
             $src = 'blog/'. $user->uid;
@@ -415,7 +413,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.46
diff -u -p -r1.46 pathauto_node.inc
--- pathauto_node.inc	8 Jun 2008 23:58:58 -0000	1.46
+++ pathauto_node.inc	9 Jun 2008 09:32:46 -0000
@@ -65,7 +65,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	9 Jun 2008 09:32:46 -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 {
