diff --git a/plugins/FeedsProcessor.inc b/plugins/FeedsProcessor.inc index d37555d75ab699852f4b3ab616af0595b6b3dd1c..903fe1233bb1742896dcfcd1ab8573b42a8ce1bb 100755 --- a/plugins/FeedsProcessor.inc +++ b/plugins/FeedsProcessor.inc @@ -165,14 +165,8 @@ abstract class FeedsProcessor extends FeedsPlugin { $replace_existing = $this->config['update_existing'] == FEEDS_REPLACE_EXISTING; - // Build a new entity. - if (!$entity_id || $replace_existing) { - $entity = $this->newEntity($source); - $this->newItemInfo($entity, $source->feed_nid, $hash); - } - // Load an existing entity. - else { + if ($entity_id) { $entity = $this->entityLoad($source, $entity_id); // The feeds_item table is always updated with the info for the most @@ -181,9 +175,10 @@ abstract class FeedsProcessor extends FeedsPlugin { $entity->feeds_item->entity_id = $entity_id; } - if ($entity_id && $replace_existing) { - $entity->is_new = FALSE; - $entity->$id_key = $entity_id; + // Build a new entity. + else { + $entity = $this->newEntity($source); + $this->newItemInfo($entity, $source->feed_nid, $hash); } // Set property and field values.