summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-08-12 10:42:41 +0000
committerDries Buytaert <dries@buytaert.net>2008-08-12 10:42:41 +0000
commit6e882d8905d78383a540140c3e4d526b218c93ef (patch)
tree00b8f5f7abd10a569e7f8491d55339b524099cee
parent021be926d4c31f1f31673735f1bd37335e89afce (diff)
downloadbrdo-6e882d8905d78383a540140c3e4d526b218c93ef.tar.gz
brdo-6e882d8905d78383a540140c3e4d526b218c93ef.tar.bz2
- 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.
-rw-r--r--modules/aggregator/aggregator.module5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index 43de2d8cc..61a2cf342 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -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'])));
}