Commit caf65e39 authored by Dries's avatar Dries

- Patch #13941 by Promotheus6: Atom feeds have a CONTENT and/or SUMMARY tag...

- 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.
parent 6a4e6df3
......@@ -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.
......
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment