Index: modules/aggregator/aggregator.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.module,v
retrieving revision 1.385
diff -u -r1.385 aggregator.module
--- modules/aggregator/aggregator.module	8 Aug 2008 20:09:22 -0000	1.385
+++ modules/aggregator/aggregator.module	10 Aug 2008 16:39:12 -0000
@@ -598,7 +598,6 @@
       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:
@@ -633,6 +632,10 @@
         // 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'])));
         break;
