Skip to content
Snippets Groups Projects
Commit 49535c9b authored by Franz Glauber Vanderlinde's avatar Franz Glauber Vanderlinde
Browse files

Issue #1450714 by getgood: ATOM parser ignores 'updated' tag

parent 48b9f61e
No related branches found
No related tags found
No related merge requests found
...@@ -201,7 +201,19 @@ function _parser_common_syndication_atom10_parse($feed_XML) { ...@@ -201,7 +201,19 @@ function _parser_common_syndication_atom10_parse($feed_XML) {
$item['title'] = _parser_common_syndication_title($title, $body); $item['title'] = _parser_common_syndication_title($title, $body);
$item['description'] = $body; $item['description'] = $body;
$item['author_name'] = $original_author; $item['author_name'] = $original_author;
$item['timestamp'] = _parser_common_syndication_parse_date(isset($news->published) ? "{$news->published}" : "{$news->issued}");
// Fall back to updated for timestamp if both published and issued are
// empty.
if (isset($news->published)) {
$item['timestamp'] = _parser_common_syndication_parse_date("{$news->published}");
}
elseif (isset($news->issued)) {
$item['timestamp'] = _parser_common_syndication_parse_date("{$news->issued}");
}
elseif (isset($news->updated)) {
$item['timestamp'] = _parser_common_syndication_parse_date("{$news->updated}");
}
$item['url'] = trim($original_url); $item['url'] = trim($original_url);
if (valid_url($item['url']) && !valid_url($item['url'], TRUE) && !empty($base)) { if (valid_url($item['url']) && !valid_url($item['url'], TRUE) && !empty($base)) {
$item['url'] = $base . $item['url']; $item['url'] = $base . $item['url'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment