? 725392-2_create_feeds_dir.patch
? 731338-7_content_type_1.patch
? 731338-8_content_type.patch
? 753426-17_update_replace.patch
? 753426_update_replace_0.patch
? 776972-10_fix_singular_plural.patch
? feeds.plural_1.patch
? taxonomy_mapper_save_new.patch
? libraries/PuSHSubscriber
? libraries/simplepie.inc
Index: mappers/content.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/feeds/mappers/content.inc,v
retrieving revision 1.4
diff -u -p -r1.4 content.inc
--- mappers/content.inc	29 Mar 2010 02:55:50 -0000	1.4
+++ mappers/content.inc	28 Apr 2010 22:23:05 -0000
@@ -39,7 +39,7 @@ function content_feeds_node_processor_ta
  */
 function content_feeds_set_target($node, $target, $value) {
 
-  $field = isset($node->$target) ? $node->$target : array();
+  $field = array();
 
   // Handle multiple value fields.
   if (is_array($value)) {
Index: mappers/filefield.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/feeds/mappers/filefield.inc,v
retrieving revision 1.4
diff -u -p -r1.4 filefield.inc
--- mappers/filefield.inc	29 Mar 2010 02:55:50 -0000	1.4
+++ mappers/filefield.inc	28 Apr 2010 22:23:05 -0000
@@ -58,7 +58,7 @@ function filefield_feeds_set_target($nod
   }
 
   // Map enclosures.
-  $items = isset($node->$field_name) ? $node->$field_name : array();
+  $items = array();
   foreach ($enclosures as $enclosure) {
     if ($file = $enclosure->getFile()) {
       $field = content_fields($field_name, $node->type);
Index: mappers/taxonomy.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/feeds/mappers/taxonomy.inc,v
retrieving revision 1.1
diff -u -p -r1.1 taxonomy.inc
--- mappers/taxonomy.inc	5 Dec 2009 01:38:27 -0000	1.1
+++ mappers/taxonomy.inc	28 Apr 2010 22:23:06 -0000
@@ -50,6 +50,15 @@ function taxonomy_feeds_set_target(&$nod
   $vocab_id = (int) str_replace('taxonomy:', '', $key);
   $vocab = taxonomy_vocabulary_load($vocab_id);
 
+  if (isset($node->taxonomy)) {
+    // Remove target vocabulary terms from node before adding new ones
+    foreach ($node->taxonomy as $term) {
+      if ($term->vid == $vocab->vid) {
+        unset($node->taxonomy[$term->tid]);
+      }
+    }
+  }
+
   // Cast a given single string to an array so we can use it.
   if (!is_array($terms)) {
     $terms = array($terms);
Index: plugins/FeedsNodeProcessor.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/feeds/plugins/FeedsNodeProcessor.inc,v
retrieving revision 1.32
diff -u -p -r1.32 FeedsNodeProcessor.inc
--- plugins/FeedsNodeProcessor.inc	28 Apr 2010 22:15:13 -0000	1.32
+++ plugins/FeedsNodeProcessor.inc	28 Apr 2010 22:23:06 -0000
@@ -9,6 +9,11 @@
 // Create or delete FEEDS_NODE_BATCH_SIZE at a time.
 define('FEEDS_NODE_BATCH_SIZE', 50);
 
+// Updating mode for existing nodes
+define('FEEDS_NODE_SKIP_EXISTING', 0);
+define('FEEDS_NODE_REPLACE_EXISTING', 1);
+define('FEEDS_NODE_UPDATE_EXISTING', 2);
+
 /**
  * Creates nodes from feed items.
  */
@@ -25,7 +30,7 @@ class FeedsNodeProcessor extends FeedsPr
     while ($item = $batch->shiftItem()) {
 
       // Create/update if item does not exist or update existing is enabled.
-      if (!($nid = $this->existingItemId($item, $source)) || $this->config['update_existing']) {
+      if (!($nid = $this->existingItemId($item, $source)) || ($this->config['update_existing'] != FEEDS_NODE_SKIP_EXISTING)) {
 
         $node = new stdClass();
         $hash = $this->hash($item);
@@ -38,9 +43,15 @@ class FeedsNodeProcessor extends FeedsPr
             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));
+          if ($this->config['update_existing'] == FEEDS_NODE_REPLACE_EXISTING) {
+            // Replace existing item nodes
+            $node->nid = $nid;
+            $node->vid = db_result(db_query("SELECT vid FROM {node} WHERE nid = %d", $nid));
+          }
+          else {
+            // Update existing item nodes (slower than replacing them)
+            $node = node_load($nid, NULL, TRUE);
+          }
           $batch->updated++;
         }
         else {
@@ -163,7 +174,7 @@ class FeedsNodeProcessor extends FeedsPr
     $type = isset($types['story']) ? 'story' : key($types);
     return array(
       'content_type' => $type,
-      'update_existing' => 0,
+      'update_existing' => FEEDS_NODE_SKIP_EXISTING,
       'expire' => FEEDS_EXPIRE_NEVER,
       'mappings' => array(),
     );
@@ -191,9 +202,14 @@ class FeedsNodeProcessor extends FeedsPr
       '#default_value' => $this->config['expire'],
     );
     $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(
+        FEEDS_NODE_SKIP_EXISTING => 'Do not update existing item nodes',
+        FEEDS_NODE_REPLACE_EXISTING => 'Replace existing item nodes',
+        FEEDS_NODE_UPDATE_EXISTING => 'Update existing item nodes (slower than replacing them)',
+      ),
       '#default_value' => $this->config['update_existing'],
     );
     return $form;
