summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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'])) {