Skip to content
Snippets Groups Projects
Commit 29b54117 authored by Alex Barth's avatar Alex Barth
Browse files

#726012: reset RSS descriptions.

parent 97725776
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
Feeds 6.x 1.0 xxxxx xx, 2010-xx-xx 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: Fix a typo in the return value of process() in FeedsTermProcessor.
- alex_b: Stop PubSubHubbub from subscribing if it is not enabled. - alex_b: Stop PubSubHubbub from subscribing if it is not enabled.
- #711664 neclimdul: guarantee compatibility with CTools 1.4 by declaring that - #711664 neclimdul: guarantee compatibility with CTools 1.4 by declaring that
......
...@@ -346,6 +346,7 @@ function _parser_common_syndication_RSS20_parse($feed_XML) { ...@@ -346,6 +346,7 @@ function _parser_common_syndication_RSS20_parse($feed_XML) {
$parsed_source['items'] = array(); $parsed_source['items'] = array();
foreach ($feed_XML->xpath('//item') as $news) { foreach ($feed_XML->xpath('//item') as $news) {
$title = $body = $original_author = $original_url = $guid = '';
$category = $news->xpath('category'); $category = $news->xpath('category');
// Get children for current namespace. // Get children for current namespace.
if (version_compare(phpversion(), '5.1.2', '>')) { if (version_compare(phpversion(), '5.1.2', '>')) {
...@@ -358,9 +359,6 @@ function _parser_common_syndication_RSS20_parse($feed_XML) { ...@@ -358,9 +359,6 @@ function _parser_common_syndication_RSS20_parse($feed_XML) {
if (isset($news['title'])) { if (isset($news['title'])) {
$title = "{$news['title']}"; $title = "{$news['title']}";
} }
else {
$title = '';
}
if (isset($news['description'])) { if (isset($news['description'])) {
$body = "{$news['description']}"; $body = "{$news['description']}";
...@@ -387,24 +385,15 @@ function _parser_common_syndication_RSS20_parse($feed_XML) { ...@@ -387,24 +385,15 @@ function _parser_common_syndication_RSS20_parse($feed_XML) {
elseif (isset($dc["creator"])) { elseif (isset($dc["creator"])) {
$original_author = (string)$dc["creator"]; $original_author = (string)$dc["creator"];
} }
else {
$original_author = NULL;
}
if (!empty($news['link'])) { if (!empty($news['link'])) {
$original_url = "{$news['link']}"; $original_url = "{$news['link']}";
} $guid = $original_url;
else {
$original_url = NULL;
} }
if (isset($news['guid'])) { if (isset($news['guid'])) {
$guid = "{$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 = array();
$additional_taxonomies['RSS Categories'] = array(); $additional_taxonomies['RSS Categories'] = array();
......
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