--- C:/Documents and Settings/MedLineTec/Escritorio/pathauto/pathauto.inc	Sun Mar 14 08:02:31 2010
+++ C:/Documents and Settings/MedLineTec/Escritorio/pathauto/pathauto.NEW.inc	Wed May 05 14:46:42 2010
@@ -113,10 +113,10 @@
         $output['pid'] = $data->pid;
       // Add new alias in addition to old one
       case PATHAUTO_UPDATE_ACTION_LEAVE:
+      // Add new alias if there isn't one already
+      case PATHAUTO_UPDATE_ACTION_NO_NEW:
         $output['old_alias'] = $data->alias;
         break;
-      // Do nothing
-      case PATHAUTO_UPDATE_ACTION_NO_NEW:
       default:
         break;
     }
@@ -320,13 +320,13 @@
   $pid = NULL;
   $old_alias = NULL;
   if ($op == 'update' or $op == 'bulkupdate') {
-    if (variable_get('pathauto_update_action', PATHAUTO_UPDATE_ACTION_DELETE) == PATHAUTO_UPDATE_ACTION_NO_NEW) {
-      // Do nothing
-      return '';
-    }
     $update_data = _pathauto_existing_alias_data($source);
     $pid = $update_data['pid'];
     $old_alias = $update_data['old_alias'];
+    if ((variable_get('pathauto_update_action', PATHAUTO_UPDATE_ACTION_DELETE) == PATHAUTO_UPDATE_ACTION_NO_NEW) && !empty($old_alias)) {
+      // Do nothing
+      return '';
+    }
   }
 
   // Replace any tokens in the pattern. Uses callback option to clean replacements. No sanitization.
