Index: views_plugin_style_rss_fields.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_rss/views/views_plugin_style_rss_fields.inc,v
retrieving revision 1.1.2.7
diff -u -r1.1.2.7 views_plugin_style_rss_fields.inc
--- views_plugin_style_rss_fields.inc	12 May 2010 15:01:07 -0000	1.1.2.7
+++ views_plugin_style_rss_fields.inc	20 May 2010 19:03:02 -0000
@@ -12,9 +12,32 @@
    * feed image link.
    */
   function attach_to($display_id, $path, $title) {
-    $url_options = array('html' => true);
-    $image = theme('image', $this->feed_image);
-    $this->view->feed_icon .= l($image, $path, $url_options);
+    $display = $this->view->display[$display_id]->handler;
+    $url_options = array();
+    $input = $this->view->get_exposed_input();
+    if ($input) {
+      $url_options['query'] = $input;
+    }
+
+    $url = url($this->view->get_url(NULL, $path), $url_options);
+    if ($display->has_path() && !$this->options['feed_in_links']) {
+      if (empty($this->preview)) {
+        drupal_add_feed($url, $title);
+      }
+    }
+    else {
+      if (empty($this->view->feed_icon)) {
+        $this->view->feed_icon = '';
+      }
+
+      $this->view->feed_icon .= theme('feed_icon', $url, $title);
+      drupal_add_link(array(
+        'rel' => 'alternate',
+        'type' => 'application/rss+xml',
+        'title' => $title,
+        'href' => $url
+      ));
+    }
   }
   
   
@@ -126,6 +149,12 @@
         '#options' => $field_names,
         '#default_value' => $this->options['georss']['lon'],
       );
+      $form['feed_in_links'] = array(
+        '#type' => 'checkbox',
+        '#default_value' => !empty($this->options['feed_in_links']),
+        '#title' => t('Display the feed icon in the links attached to the view.'),
+        '#weight' => 10,
+      );
     }
   }
 

