? better_warnings_191393.patch
? blog_perm_regression_192949.patch
? bookpathalias_144366.patch
? collapse_patterns_add_help_192298.patch
? delete_index_aliases_192576.patch
? edit_checkbox_remember_180440.patch
? include_for_sure_194669.patch
? new_node_no_pid_bulk_175830.patch
? no_alter_no_pattern_192300.patch
? only_alias_blogabble_bloggers_83993.patch
? require_code_191187.patch
? token_list_moved.patch
? tracker_raw_194108.patch
? verbose_perm_32956.patch
Index: pathauto.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.module,v
retrieving revision 1.44.4.56
diff -u -p -r1.44.4.56 pathauto.module
--- pathauto.module	19 Nov 2007 22:18:27 -0000	1.44.4.56
+++ pathauto.module	24 Nov 2007 12:25:47 -0000
@@ -587,7 +587,15 @@ function pathauto_form_alter($formid, &$
       $pattern = variable_get('pathauto_node_pattern', FALSE);
     }
     $path = $form['path']['path']['#default_value'];
-    $pid = db_result(db_query("SELECT pid FROM {url_alias_extra} WHERE dst = '%s'", $path));
+    if(strlen($path)) {
+      $pathauto_alias = db_result(db_query("SELECT pid FROM {url_alias_extra} WHERE dst = '%s'", $path));
+    }
+    else if ($form['nid']['#value']) {
+      $pathauto_alias = FALSE;
+    }
+    else {
+      $pathauto_alias = TRUE;
+    }
     if ($pattern && user_access('create url aliases')) {
       $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')) {
@@ -598,7 +606,7 @@ function pathauto_form_alter($formid, &$
 
       $form['path']['pathauto_perform_alias'] = array('#type' => 'checkbox',
         '#title' => t('Automatic alias'),
-        '#default_value' => $pid,
+        '#default_value' => $pathauto_alias,
         '#description' => $output,
         '#weight' => 0
       );
@@ -613,7 +621,6 @@ function pathauto_form_alter($formid, &$
  */
 function pathauto_taxonomy($op, $type, $object = NULL) {
   _pathauto_include();
-
   switch ($type) {
     case 'term':
       switch ($op) {
