diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c7f75b74278e9eb28bf0939c77db48e881b734e4..a02516b4afcf095ab0ffc89ca8c2245fda1ea84d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ Feeds 6.x 1.0 XXXXXXXXXXXXXXXXXX -------------------------------- +- #836090 andrewlevine, alex_b: Include mapping configuration in hash. - #853156 alex_b: Support real updates of terms. - #858684 alex_b: Fix notices when file not found. diff --git a/plugins/FeedsNodeProcessor.inc b/plugins/FeedsNodeProcessor.inc index 8d7dfc24d2a4f3add90b498822df8ccc5bfdd023..adaf74cb8c34cc17e5646ea9d2c795b06a156af5 100644 --- a/plugins/FeedsNodeProcessor.inc +++ b/plugins/FeedsNodeProcessor.inc @@ -361,13 +361,21 @@ class FeedsNodeProcessor extends FeedsProcessor { } /** - * Create MD5 hash of $item array. + * Create MD5 hash of item and mappings array. + * + * Include mappings as a change in mappings may have an affect on the item + * produced. + * * @return Always returns a hash, even with empty, NULL, FALSE: * Empty arrays return 40cd750bba9870f18aada2478b24840a * Empty/NULL/FALSE strings return d41d8cd98f00b204e9800998ecf8427e */ protected function hash($item) { - return hash('md5', serialize($item)); + static $serialized_mappings; + if (!$serialized_mappings) { + $serialized_mappings = serialize($this->config['mappings']); + } + return hash('md5', serialize($item) . $serialized_mappings); } /**