Skip to content
Snippets Groups Projects
Commit 5a6d3e6e authored by Alex Barth's avatar Alex Barth
Browse files

#774858 rjbrown99: Fix Node Processor updates node "created" time when updating.

parent a08c0cd8
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,8 @@
Feeds 6.x 1.0 xxxxxxxxxxxxxxxxxxxx
----------------------------------
- #774858 rjbrown99: Fix Node Processor updates node "created" time when
updating.
- #704236 jerdavis: Support mapping to CCK float field.
- #783820 klonos: Fix warning: copy() [function.copy]: Filename cannot be empty
in FeedsParser.inc on line 168.
......
......@@ -30,22 +30,22 @@ class FeedsNodeProcessor extends FeedsProcessor {
$node = new stdClass();
$hash = $this->hash($item);
// If updating check whether item actually has changed and if so,
// retrieve its nid and vid.
if (!empty($nid)) {
// If hash of this item is same as existing hash there is no actual
// change, skip.
if ($hash == $this->getHash($nid)) {
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));
}
else {
$node->created = FEEDS_REQUEST_TIME;
}
// Populate and prepare node object.
$node->type = $this->config['content_type'];
$node->created = FEEDS_REQUEST_TIME;
$node->changed = FEEDS_REQUEST_TIME;
$node->feeds_node_item = new stdClass();
$node->feeds_node_item->hash = $hash;
$node->feeds_node_item->id = $this->id;
......
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