From 29b54117ddf5c2ef6037c3965c83100fee537774 Mon Sep 17 00:00:00 2001 From: Alex Barth <alex_b@53995.no-reply.drupal.org> Date: Sat, 27 Feb 2010 04:45:17 +0000 Subject: [PATCH] #726012: reset RSS descriptions. --- CHANGELOG.txt | 2 ++ libraries/common_syndication_parser.inc | 15 ++------------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4036ac5a..dee16d34 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,8 @@ Feeds 6.x 1.0 xxxxx xx, 2010-xx-xx ---------------------------------- +- #726012 alex_b: Fix RSS descriptions not being reset in + common_syndication_parser.inc. - alex_b: Fix a typo in the return value of process() in FeedsTermProcessor. - alex_b: Stop PubSubHubbub from subscribing if it is not enabled. - #711664 neclimdul: guarantee compatibility with CTools 1.4 by declaring that diff --git a/libraries/common_syndication_parser.inc b/libraries/common_syndication_parser.inc index 503235ab..a1d8254f 100644 --- a/libraries/common_syndication_parser.inc +++ b/libraries/common_syndication_parser.inc @@ -346,6 +346,7 @@ function _parser_common_syndication_RSS20_parse($feed_XML) { $parsed_source['items'] = array(); foreach ($feed_XML->xpath('//item') as $news) { + $title = $body = $original_author = $original_url = $guid = ''; $category = $news->xpath('category'); // Get children for current namespace. if (version_compare(phpversion(), '5.1.2', '>')) { @@ -358,9 +359,6 @@ function _parser_common_syndication_RSS20_parse($feed_XML) { if (isset($news['title'])) { $title = "{$news['title']}"; } - else { - $title = ''; - } if (isset($news['description'])) { $body = "{$news['description']}"; @@ -387,24 +385,15 @@ function _parser_common_syndication_RSS20_parse($feed_XML) { elseif (isset($dc["creator"])) { $original_author = (string)$dc["creator"]; } - else { - $original_author = NULL; - } if (!empty($news['link'])) { $original_url = "{$news['link']}"; - } - else { - $original_url = NULL; + $guid = $original_url; } if (isset($news['guid'])) { $guid = "{$news['guid']}"; } - else { - // Attempt to fall back on original URL if GUID is not present. - $guid = $original_url; - } $additional_taxonomies = array(); $additional_taxonomies['RSS Categories'] = array(); -- GitLab