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 00:30:51 -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 {
@@ -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,18 +242,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 '';
   }
 
@@ -376,14 +374,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 +400,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 +470,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 00:30:52 -0000
@@ -223,14 +223,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 +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')));
@@ -388,7 +387,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 +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.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 00:30:52 -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 00:30:52 -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 {
