Commit 6e882d89 authored by Dries's avatar Dries

- Patch #293532 by mustafau: when a redirected feed is not parseable...

- Patch #293532 by mustafau: when a redirected feed is not parseable Aggregator saves a watchdog entry saying that the feed was updated, however the feed remains unchanged in the database.
parent 021be926
......@@ -598,7 +598,6 @@ function aggregator_refresh($feed) {
break;
case 301:
$feed['url'] = $result->redirect_url;
watchdog('aggregator', 'Updated URL for feed %title to %url.', array('%title' => $feed['title'], '%url' => $feed['url']));
// Do not break here.
case 200:
case 302:
......@@ -643,6 +642,10 @@ function aggregator_refresh($feed) {
// Clear the cache.
cache_clear_all();
if (isset($result->redirect_url)) {
watchdog('aggregator', 'Updated URL for feed %title to %url.', array('%title' => $feed['title'], '%url' => $feed['url']));
}
watchdog('aggregator', 'There is new syndicated content from %site.', array('%site' => $feed['title']));
drupal_set_message(t('There is new syndicated content from %site.', array('%site' => $feed['title'])));
}
......
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