? .DS_Store
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.541
diff -u -F^f -r1.541 common.inc
--- includes/common.inc	22 May 2006 20:41:16 -0000	1.541
+++ includes/common.inc	31 May 2006 19:11:46 -0000
@@ -150,6 +150,25 @@ function drupal_get_headers() {
 }
 
 /**
+ * Set the feed URL for the current page.
+ */
+function drupal_set_feed_url($url = NULL) {
+  static $stored_url;
+  
+  if (!is_null($url)) {
+    $stored_url = $url;
+  }
+  return $stored_url;
+}
+
+/**
+ * Get the feed URL for the current page.
+ */
+function drupal_get_feed_url() {
+  return drupal_set_feed_url();
+}
+
+/**
  * @name HTTP handling
  * @{
  * Functions to properly handle HTTP responses.
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.297
diff -u -F^f -r1.297 theme.inc
--- includes/theme.inc	20 May 2006 01:24:30 -0000	1.297
+++ includes/theme.inc	31 May 2006 19:11:47 -0000
@@ -414,6 +414,7 @@ function theme_page($content) {
 
   $output .= "\n<!-- begin content -->\n";
   $output .= $content;
+  $output .= drupal_get_feed_url() ? theme('feed_icon', drupal_get_feed_url()) : '';
   $output .= "\n<!-- end content -->\n";
 
   $output .= '</td></tr></table>';
Index: modules/aggregator.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator.module,v
retrieving revision 1.282
diff -u -F^f -r1.282 aggregator.module
--- modules/aggregator.module	18 May 2006 14:58:56 -0000	1.282
+++ modules/aggregator.module	31 May 2006 19:11:49 -0000
@@ -1081,12 +1081,11 @@ function _aggregator_page_list($sql, $op
   // arg(1) is undefined if we are at the top aggregator URL
   // is there a better way to do this?
   if (!arg(1)) {
-    $form['feed_icon'] = array('#value' => theme('feed_icon', url('aggregator/rss')));
+    drupal_set_feed_url(url('aggregator/rss'));
   }
   elseif (arg(1) == 'categories' && arg(2) && !arg(3)) {
-    $form['feed_icon'] = array('#value' => theme('feed_icon', url('aggregator/rss/' . arg(2))));
+    drupal_set_feed_url(url('aggregator/rss/' . arg(2)));
   }
-  $output .= $form['feed_icon']['#value'];
 
   return ($categorize) ? drupal_get_form('aggregator_page_list', $form) : $output;
 }
Index: modules/blog.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/blog.module,v
retrieving revision 1.249
diff -u -F^f -r1.249 blog.module
--- modules/blog.module	18 May 2006 14:58:56 -0000	1.249
+++ modules/blog.module	31 May 2006 19:11:49 -0000
@@ -159,7 +159,7 @@ function blog_page_user($uid) {
       $output .= node_view(node_load($node->nid), 1);
     }
     $output .= theme('pager', NULL, variable_get('default_nodes_main', 10));
-    $output .= theme('feed_icon', url("blog/$account->uid/feed"));
+    drupal_set_feed_url(url("blog/$account->uid/feed"));
 
     drupal_add_link(array('rel' => 'alternate',
                           'type' => 'application/rss+xml',
@@ -186,7 +186,7 @@ function blog_page_last() {
     $output .= node_view(node_load($node->nid), 1);
   }
   $output .= theme('pager', NULL, variable_get('default_nodes_main', 10));
-  $output .= theme('feed_icon', url('blog/feed'));
+  drupal_set_feed_url(url('blog/feed'));
 
   drupal_add_link(array('rel' => 'alternate',
                         'type' => 'application/rss+xml',
Index: modules/forum.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum.module,v
retrieving revision 1.332
diff -u -F^f -r1.332 forum.module
--- modules/forum.module	29 May 2006 12:58:19 -0000	1.332
+++ modules/forum.module	31 May 2006 19:11:50 -0000
@@ -916,7 +916,7 @@ function theme_forum_display($forums, $t
                             'href' => url('taxonomy/term/'. $tid .'/0/feed')));
 
       $output .= theme('forum_topic_list', $tid, $topics, $sortby, $forum_per_page);
-      $output .= theme('feed_icon', url("taxonomy/term/$tid/0/feed"));
+      drupal_set_feed_url(url("taxonomy/term/$tid/0/feed"));
     }
     $output .= '</div>';
   }
Index: modules/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node.module,v
retrieving revision 1.650
diff -u -F^f -r1.650 node.module
--- modules/node.module	18 May 2006 14:58:57 -0000	1.650
+++ modules/node.module	31 May 2006 19:11:53 -0000
@@ -1971,10 +1971,12 @@ function node_page_default() {
   $result = pager_query(db_rewrite_sql('SELECT n.nid, n.sticky, n.created FROM {node} n WHERE n.promote = 1 AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC'), variable_get('default_nodes_main', 10));
 
   if (db_num_rows($result)) {
+    $feed_url = url('rss.xml', NULL, NULL, TRUE);
+    drupal_set_feed_url($feed_url);
     drupal_add_link(array('rel' => 'alternate',
                           'type' => 'application/rss+xml',
                           'title' => t('RSS'),
-                          'href' => url('rss.xml', NULL, NULL, TRUE)));
+                          'href' => $feed_url));
 
     $output = '';
     while ($node = db_fetch_object($result)) {
Index: modules/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy.module,v
retrieving revision 1.288
diff -u -F^f -r1.288 taxonomy.module
--- modules/taxonomy.module	26 May 2006 21:34:12 -0000	1.288
+++ modules/taxonomy.module	31 May 2006 19:11:55 -0000
@@ -1257,7 +1257,7 @@ function taxonomy_term_page($str_tids = 
                                 'href' => url('taxonomy/term/'. $str_tids .'/'. $depth .'/feed')));
 
           $output = taxonomy_render_nodes(taxonomy_select_nodes($tids, $terms['operator'], $depth, TRUE));
-          $output .= theme('feed_icon', url('taxonomy/term/'. $str_tids .'/'. $depth .'/feed'));
+          drupal_set_feed_url(url('taxonomy/term/'. $str_tids .'/'. $depth .'/feed'));
           return $output;
           break;
 
Index: themes/bluemarine/page.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/bluemarine/page.tpl.php,v
retrieving revision 1.17
diff -u -F^f -r1.17 page.tpl.php
--- themes/bluemarine/page.tpl.php	1 Feb 2006 16:04:02 -0000	1.17
+++ themes/bluemarine/page.tpl.php	31 May 2006 19:11:56 -0000
@@ -42,6 +42,7 @@
         <?php print $help ?>
         <?php print $messages ?>
         <?php print $content; ?>
+        <?php print $feed_icon; ?>
       </div>
     </td>
     <?php if ($sidebar_right) { ?><td id="sidebar-right">
Index: themes/chameleon/chameleon.theme
===================================================================
RCS file: /cvs/drupal/drupal/themes/chameleon/chameleon.theme,v
retrieving revision 1.45
diff -u -F^f -r1.45 chameleon.theme
--- themes/chameleon/chameleon.theme	23 May 2006 02:07:36 -0000	1.45
+++ themes/chameleon/chameleon.theme	31 May 2006 19:11:56 -0000
@@ -90,6 +90,7 @@ function chameleon_page($content) {
 
   $output .= "\n<!-- begin content -->\n";
   $output .= $content;
+  $output .= drupal_get_feed_url() ? theme('feed_icon', drupal_get_feed_url()) : '';
   $output .= "\n<!-- end content -->\n";
 
   if ($footer = variable_get('site_footer', '')) {
Index: themes/engines/phptemplate/phptemplate.engine
===================================================================
RCS file: /cvs/drupal/drupal/themes/engines/phptemplate/phptemplate.engine,v
retrieving revision 1.35
diff -u -F^f -r1.35 phptemplate.engine
--- themes/engines/phptemplate/phptemplate.engine	7 May 2006 00:08:36 -0000	1.35
+++ themes/engines/phptemplate/phptemplate.engine	31 May 2006 19:11:56 -0000
@@ -141,7 +141,7 @@ function phptemplate_features() {
  * into a pluggable template engine.
  */
 function phptemplate_page($content) {
-
+  
   /* Set title and breadcrumb to declared values */
   if (drupal_is_front_page()) {
     $mission = filter_xss_admin(theme_get_setting('mission'));
@@ -182,13 +182,14 @@ function phptemplate_page($content) {
     if (variable_get('site_slogan', '')) {
       $head_title[] = variable_get('site_slogan', '');
     }
-  }
+  }  
 
   $variables = array(
     'base_path'           => base_path(),
     'breadcrumb'          => theme('breadcrumb', drupal_get_breadcrumb()),
     'closure'             => theme('closure'),
     'content'             => '<!-- begin content -->' . $content . '<!-- end content -->',
+    'feed_icon'           => drupal_get_feed_url() ? theme('feed_icon', drupal_get_feed_url()) : '',
     'footer_message'      => filter_xss_admin(variable_get('site_footer', FALSE)) . "\n" . theme('blocks', 'footer'),
     'head'                => drupal_get_html_head(),
     'head_title'          => implode(' | ', $head_title),
Index: themes/pushbutton/page.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/pushbutton/page.tpl.php,v
retrieving revision 1.13
diff -u -F^f -r1.13 page.tpl.php
--- themes/pushbutton/page.tpl.php	1 Feb 2006 16:04:03 -0000	1.13
+++ themes/pushbutton/page.tpl.php	31 May 2006 19:11:56 -0000
@@ -80,7 +80,8 @@
         <?php endif; ?>
 
       <!-- start main content -->
-      <?php print($content) ?>
+      <?php print $content; ?>
+      <?php print $feed_icon; ?>
       <!-- end main content -->
 
       </div><!-- main -->
