--- pathauto.module	2007-04-11 12:26:08.000000000 -0400
+++ pathauto.module	2007-06-22 11:48:26.000000000 -0400
@@ -136,7 +136,7 @@ function pathauto_admin_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),
@@ -146,7 +146,7 @@ function pathauto_admin_settings() {
     // them up here
     if (isset($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, ''),
@@ -317,10 +317,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...)
@@ -500,7 +500,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
 
 /**
@@ -622,6 +622,11 @@ function _pathauto_update() {
       }
       variable_del('pathauto_applytofeed');
     }
+    if ($installed_version['build'] <= 5) {
+      // reduce the number of characters pathauto uses for labeling of pattern variables for CCK compatability (_pattern becomes _p)
+      $query = "UPDATE `variable` SET name = LEFT( name, LENGTH( name) -6 ) WHERE name LIKE 'pathauto_%_pattern'";
+      $result = db_query($query);
+    }
 
     // Set the current version
     variable_set('pathauto_version', $current_version);
