Skip to content
Snippets Groups Projects
Commit 00ffe9e1 authored by Chris Leppanen's avatar Chris Leppanen
Browse files

Re-fix replace existing behavior.

parent d0dc5e50
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment