diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-08-23 05:16:50 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-08-23 05:16:50 +0000 |
commit | caf65e39537dea9dc58022f7430263c88b885cc5 (patch) | |
tree | c02d4184e9db3416f694d2435ce825c116fbc2bd /modules/aggregator | |
parent | 6a4e6df36fe43b45c78a160fdf58df8d78ae5f02 (diff) | |
download | brdo-caf65e39537dea9dc58022f7430263c88b885cc5.tar.gz brdo-caf65e39537dea9dc58022f7430263c88b885cc5.tar.bz2 |
- Patch #13941 by Promotheus6: Atom feeds have a CONTENT and/or SUMMARY tag instead of a DESCRIPTION tag. Currently, if both tags are present the aggregator appends the content of both fields to replace the content of the DESCRIPTION tag.
Diffstat (limited to 'modules/aggregator')
-rw-r--r-- | modules/aggregator/aggregator.module | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index 58080a71e..c7e1fb6c7 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -351,10 +351,10 @@ function aggregator_element_data($parser, $data) { } break; case 'CONTENT': - $items[$item]['DESCRIPTION'] .= $data; + $items[$item]['CONTENT'] .= $data; break; case 'SUMMARY': - $items[$item]['DESCRIPTION'] .= $data; + $items[$item]['SUMMARY'] .= $data; break; case 'TAGLINE': case 'SUBTITLE': @@ -559,6 +559,16 @@ function aggregator_parse_feed(&$data, $feed) { $link = $feed['link']; } + /** + * Atom feeds have a CONTENT and/or SUMMARY tag instead of a DESCRIPTION tag + */ + if ($item['CONTENT']) { + $item['DESCRIPTION'] = $item['CONTENT']; + } + else if ($item['SUMMARY']) { + $item['DESCRIPTION'] = $item['SUMMARY']; + } + /* ** Try to resolve and parse the item's publication date. If no ** date is found, we use the current date instead. |