Index: FeedsNodeProcessor.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/feeds/plugins/FeedsNodeProcessor.inc,v
retrieving revision 1.24
diff -u -r1.24 FeedsNodeProcessor.inc
--- FeedsNodeProcessor.inc	23 Feb 2010 22:24:50 -0000	1.24
+++ FeedsNodeProcessor.inc	26 Mar 2010 21:54:52 -0000
@@ -38,10 +38,17 @@
             continue;
           }
 
-          // If updating populate nid and vid avoiding an expensive node_load().
-          $node->nid = $nid;
-          $node->vid = db_result(db_query('SELECT vid FROM {node} WHERE nid = %d', $nid));
-          $batch->updated++;
+          if ($this->config['update_existing'] == 1) {
+            // Replace existing item nodes
+            $node->nid = $nid;
+            $node->vid = db_result(db_query('SELECT vid FROM {node} WHERE nid = %d', $nid));
+            $batch->replaced++;
+          }
+          else {
+            // Update existing item nodes (slower than replacing them)
+            $node = node_load($nid, NULL, TRUE);
+            $batch->updated++;
+          }
         }
         else {
           $batch->created++;
@@ -81,12 +88,15 @@
 
     // Set messages.
     if ($batch->created) {
-      drupal_set_message(t('Created !number !type nodes.', array('!number' => $batch->created, '!type' => node_get_types('name', $this->config['content_type']))));
+      drupal_set_message(format_plural($batch->created, 'Created one @type node.', 'Created @count @type nodes.', array('@type' => node_get_types('name', $this->config['content_type']))));
     }
-    elseif ($batch->updated) {
-      drupal_set_message(t('Updated !number !type nodes.', array('!number' => $batch->updated, '!type' => node_get_types('name', $this->config['content_type']))));
+    if ($batch->replaced) {
+      drupal_set_message(format_plural($batch->replaced, 'Replaced one @type node.', 'Replaced @count @type nodes.', array('@type' => node_get_types('name', $this->config['content_type']))));
     }
-    else {
+    if ($batch->updated) {
+      drupal_set_message(format_plural($batch->updated, 'Updated one @type node.', 'Updated @count @type nodes.', array('@type' => node_get_types('name', $this->config['content_type']))));
+    }
+    if (!$batch->created && !$batch->replaced && !$batch->updated) {
       drupal_set_message(t('There is no new content.'));
     }
 
@@ -183,9 +193,14 @@
       '#default_value' => $this->config['content_type'],
     );
     $form['update_existing'] = array(
-      '#type' => 'checkbox',
+      '#type' => 'radios',
       '#title' => t('Update existing items'),
-      '#description' => t('Check if existing items should be updated from the feed.'),
+      '#description' => t('Choose how existing items should be updated from the feed.'),
+      '#options' => array(
+        0 => 'Do not update existing item nodes',
+        1 => 'Replace existing item nodes',
+        2 => 'Update existing item nodes (slower than replacing them)',
+      ),
       '#default_value' => $this->config['update_existing'],
     );
     $period = drupal_map_assoc(array(FEEDS_EXPIRE_NEVER, 3600, 10800, 21600, 43200, 86400, 259200, 604800, 604800 * 4, 604800 * 12, 604800 * 24, 31536000), 'feeds_format_expire');

