? generate-content.php
? generate-taxonomy.php
? modules/devel
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.546
diff -u -F^f -r1.546 common.inc
--- includes/common.inc	10 Jul 2006 08:12:31 -0000	1.546
+++ includes/common.inc	16 Jul 2006 12:10:39 -0000
@@ -149,6 +149,30 @@ function drupal_get_headers() {
   return drupal_set_header();
 }
 
+/*
+ * Set a feed URL for the current page.
+ * @param $url
+ *   The url for the feed
+ * @param $icon
+ *   The theming function to use for the icon, defaults to theme_feed_icon()
+ */
+function drupal_set_feed($url = NULL, $icon = 'feed') {
+  static $stored_urls = array();
+  
+  if (!is_null($url)) {
+    $stored_urls[$url] = theme($icon ."_icon", $url);
+  }
+  return $stored_urls;
+}
+
+/**
+ * Get the feed URLs for the current page.
+ */
+function drupal_get_feed() {
+  $feed = drupal_set_feed();
+  return implode($feed, "\n");
+}
+
 /**
  * @name HTTP handling
  * @{
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.303
diff -u -F^f -r1.303 theme.inc
--- includes/theme.inc	13 Jul 2006 13:11:36 -0000	1.303
+++ includes/theme.inc	16 Jul 2006 12:10:40 -0000
@@ -414,6 +414,7 @@ function theme_page($content) {
 
   $output .= "\n<!-- begin content -->\n";
   $output .= $content;
+  $output .= drupal_get_feed();
   $output .= "\n<!-- end content -->\n";
 
   $output .= '</td></tr></table>';
Index: modules/aggregator/aggregator.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.module,v
retrieving revision 1.290
diff -u -F^f -r1.290 aggregator.module
--- modules/aggregator/aggregator.module	10 Jul 2006 19:27:52 -0000	1.290
+++ modules/aggregator/aggregator.module	16 Jul 2006 12:10:42 -0000
@@ -1088,12 +1088,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('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('aggregator/rss/' . arg(2)));
   }
-  $output .= $form['feed_icon']['#value'];
 
   return ($categorize) ? drupal_get_form('aggregator_page_list', $form) : $output;
 }
Index: modules/blog/blog.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/blog/blog.module,v
retrieving revision 1.250
diff -u -F^f -r1.250 blog.module
--- modules/blog/blog.module	4 Jul 2006 08:59:04 -0000	1.250
+++ modules/blog/blog.module	16 Jul 2006 12:10:43 -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("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('blog/feed'));
 
   drupal_add_link(array('rel' => 'alternate',
                         'type' => 'application/rss+xml',
Index: modules/forum/forum.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v
retrieving revision 1.338
diff -u -F^f -r1.338 forum.module
--- modules/forum/forum.module	11 Jul 2006 07:04:34 -0000	1.338
+++ modules/forum/forum.module	16 Jul 2006 12:10:44 -0000
@@ -913,7 +913,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("taxonomy/term/$tid/0/feed"));
     }
     $output .= '</div>';
   }
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.658
diff -u -F^f -r1.658 node.module
--- modules/node/node.module	14 Jul 2006 11:49:45 -0000	1.658
+++ modules/node/node.module	16 Jul 2006 12:10:47 -0000
@@ -1965,10 +1965,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($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/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.295
diff -u -F^f -r1.295 taxonomy.module
--- modules/taxonomy/taxonomy.module	14 Jul 2006 01:01:15 -0000	1.295
+++ modules/taxonomy/taxonomy.module	16 Jul 2006 12:10:49 -0000
@@ -1265,7 +1265,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('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	16 Jul 2006 12:10:49 -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	16 Jul 2006 12:10:50 -0000
@@ -90,6 +90,7 @@ function chameleon_page($content) {
 
   $output .= "\n<!-- begin content -->\n";
   $output .= $content;
+  $output .= drupal_get_feed();
   $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.36
diff -u -F^f -r1.36 phptemplate.engine
--- themes/engines/phptemplate/phptemplate.engine	2 Jul 2006 19:00:21 -0000	1.36
+++ themes/engines/phptemplate/phptemplate.engine	16 Jul 2006 12:10:50 -0000
@@ -189,6 +189,7 @@ function phptemplate_page($content) {
     'breadcrumb'          => theme('breadcrumb', drupal_get_breadcrumb()),
     'closure'             => theme('closure'),
     'content'             => '<!-- begin content -->' . $content . '<!-- end content -->',
+    'feed_icon'           => drupal_get_feed(),
     '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	16 Jul 2006 12:10:51 -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 -->
