From 1a60aa129beab9964ee56620faedf76df2fc6dc1 Mon Sep 17 00:00:00 2001 From: eosrei <eosrei@372772.no-reply.drupal.org> Date: Wed, 7 Dec 2011 12:43:35 -0500 Subject: [PATCH] Issue #1046916 by eosrei: importing nodes with their original NID --- plugins/FeedsNodeProcessor.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/FeedsNodeProcessor.inc b/plugins/FeedsNodeProcessor.inc index 25dac279..423d4dc1 100644 --- a/plugins/FeedsNodeProcessor.inc +++ b/plugins/FeedsNodeProcessor.inc @@ -71,6 +71,10 @@ class FeedsNodeProcessor extends FeedsProcessor { * Save a node. */ public function entitySave($entity) { + // If nid is set and a node with that id doesn't exist, flag as new. + if (!empty($entity->nid) && !node_load($entity->nid)) { + $entity->is_new = TRUE; + } node_save($entity); } -- GitLab