diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b90a628be7f3cd4dfdc4912f97f7296fdb3a720c..f93cc7f9b2eafec7cd6edda8ab090ab1741078ee 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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. diff --git a/plugins/FeedsDataProcessor.inc b/plugins/FeedsDataProcessor.inc index ddc03860714999819354c5b745996c3e6a99a6db..875c3152ffeb7ac4d839b6f02b25a2970f7edfcb 100644 --- a/plugins/FeedsDataProcessor.inc +++ b/plugins/FeedsDataProcessor.inc @@ -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; } /**