--- modules/contrib/pathauto/pathauto.module	2006-05-08 13:02:52.000000000 -0400
+++ modules/contrib/pathauto/pathauto.module	2006-07-10 09:28:28.000000000 -0400
@@ -43,11 +43,11 @@ function pathauto_settings() {
       '#title' => t('<p>The pathauto module is an extension of the <b>path</b> '.
       'module - you must <a href="admin/modules">enable <b>path</b></a> to use it.</p>'));
     return $form;
-  }
+  } 
   
   // Check for any updates
   _pathauto_update();
-  
+
   // Generate the form - settings applying to all patterns first
   $group_weight = -20;
   $form['general'] = array('#type' => 'fieldset', '#weight' => $group_weight,
@@ -123,7 +123,7 @@ function pathauto_settings() {
     $group_weight++;
     
     // Prompt for the default pattern for this module
-    $variable = 'pathauto_'.$module.'_pattern';
+    $variable = 'pathauto_'.$module.'_p';
     $form[$module][$variable] = array('#type' => 'textfield',
       '#title' => $patterndescr,
       '#default_value' => variable_get($variable,$patterndefault),
@@ -133,7 +133,7 @@ function pathauto_settings() {
     // them up here
     if ($settings->patternitems) {
       foreach ($settings->patternitems as $itemname => $itemlabel) {
-        $variable = 'pathauto_'.$module.'_'.$itemname.'_pattern';
+        $variable = 'pathauto_'.$module.'_'.$itemname.'_p';
         $form[$module][$variable] = array('#type' => 'textfield',
           '#title' => $itemlabel, 
           '#default_value' => variable_get($variable,''),
@@ -323,10 +323,10 @@ function pathauto_create_alias($module, 
   // Retrieve and apply the pattern for this content type
   $pattern = '';
   if ($type) {
-    $pattern = drupal_strtolower(variable_get('pathauto_'.$module.'_'.$type.'_pattern', ''));
+    $pattern = drupal_strtolower(variable_get('pathauto_'.$module.'_'.$type.'_p', ''));
   } 
   if (!trim($pattern)) {
-    $pattern = drupal_strtolower(variable_get('pathauto_'.$module.'_pattern', ''));
+    $pattern = drupal_strtolower(variable_get('pathauto_'.$module.'_p', ''));
   }
   
   // No pattern? Do nothing (otherwise we may blow away existing aliases...)
@@ -475,7 +475,7 @@ function pathauto_menu($may_cache) {
  *         text version and build ID of this release, respectively.
  */
 function _pathauto_version() {
-  return array("text" => "2005-9-18", "build" => 5);
+  return array("text" => "2006-7-7", "build" => 6);
 } // function _pathauto_version
 
 /**
@@ -596,6 +596,19 @@ function _pathauto_update() {
       }
       variable_del('pathauto_applytofeed');
     }
+    // reducing the number of characters pathauto uses for labeling of pattern variables
+    if ($installed_version['build'] <= 5) {
+      $query = 'SELECT name,value FROM {variable} '.
+        "WHERE name LIKE '%_pattern'";
+      $result = db_query($query);
+      $var = db_fetch_object($result);
+      while ($var = db_fetch_object($result)) {
+        $pattern = variable_get($var->name, '');
+        $newname = drupal_substr($var->name, 0, drupal_strlen($var->name)-drupal_strlen('_pattern'))."_p";
+        variable_del($var->name);
+        variable_set($newname, $pattern);
+      }
+    }
 
     // Set the current version
     variable_set('pathauto_version', $current_version);
@@ -603,4 +616,4 @@ function _pathauto_update() {
     drupal_set_message('Upgraded pathauto from '.$installed_version['build'] .
       ' to '. $current_version['build']);
   } 
-} // end function _pathauto_update 
\ No newline at end of file
+} // end function _pathauto_update
