summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGábor Hojtsy2011-11-23 10:54:23 (GMT)
committer Gábor Hojtsy2011-11-23 10:54:23 (GMT)
commit8daa02bd4f807fdb046a2f8f35800045694276f1 (patch)
tree910426a57ee742e095845a45bf9b611d44c36d6c
parent1653a022f73b13049d19d3a30a784e0da2d83fb2 (diff)
Issue #971812 by mfb, twistor: aggregator ignores Atom id element, which is equivalent to RSS guid element
-rw-r--r--modules/aggregator/aggregator.module12
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index 59a4fdb..0afb9f5 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -751,7 +751,17 @@ function aggregator_parse_feed(&$data, $feed) {
else {
$link = $feed['link'];
}
- $guid = isset($item['GUID']) ? $item['GUID'] : '';
+
+ // Atom feeds use ID rather than GUID.
+ if (isset($item['GUID'])) {
+ $guid = $item['GUID'];
+ }
+ elseif (isset($item['ID'])) {
+ $guid = $item['ID'];
+ }
+ else {
+ $guid = '';
+ }
// Atom feeds have a CONTENT and/or SUMMARY tag instead of a DESCRIPTION tag.
if (!empty($item['CONTENT:ENCODED'])) {