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

#791296 B-Prod: Fix Feeds data processor does update id 0.

parent b21cd3e0
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@
Feeds 6.x 1.0 xxxxxxxxxxxxxxxxxxxx
----------------------------------
- #791296 B-Prod: Fix Feeds data processor does update id 0.
- #759904 lyricnz: Provide a Google Sitemap Parser.
- #774858 rjbrown99: Fix Node Processor updates node "created" time when
updating.
......
......@@ -21,7 +21,9 @@ class FeedsDataProcessor extends FeedsProcessor {
$expiry_time = $this->expiryTime();
while ($item = $batch->shiftItem()) {
if (!($id = $this->existingItemId($item, $source)) || $this->config['update_existing']) {
$id = $this->existingItemId($item, $source);
if ($id === FALSE || $this->config['update_existing']) {
// Map item to a data record, feed_nid and timestamp are mandatory.
$data = array();
$data['feed_nid'] = $source->feed_nid;
......@@ -34,7 +36,7 @@ class FeedsDataProcessor extends FeedsProcessor {
}
// Save data.
if ($id) {
if ($id !== FALSE) {
$data['id'] = $id;
$this->handler()->update($data, 'id');
$updated++;
......@@ -242,7 +244,7 @@ class FeedsDataProcessor extends FeedsProcessor {
return $records[0]['id'];
}
}
return 0;
return FALSE;
}
/**
......
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