All pastes #708821 Raw Edit

Someone

public text v1 · immutable
#708821 ·published 2007-09-24 04:23 UTC
rendered paste body
Index: includes/OutputPage.php
===================================================================
--- includes/OutputPage.php     (revision 26057)
+++ includes/OutputPage.php     (working copy)
@@ -1277,12 +1277,21 @@
                        }
                        $ret .= " />\n";
                }
+
+               # Recent changes feed should appear on every page
+               global $wgSitename;
+               $rctitle = SpecialPage::getTitleFor( 'Recentchanges' );
+               $link = $rctitle->escapeFullURL( 'feed=rss' );
+               $ret .= "<link rel='alternate' type='application/rss+xml' title='$wgSitename' href='$link' />\n";
+               $link = $rctitle->escapeFullURL( 'feed=atom' );
+               $ret .= "<link rel='alternate' type='application/atom+xml' title='$wgSitename' href='$link' />\n";
                if( $this->isSyndicated() ) {
                        # FIXME: centralize the mime-type and name information in Feed.php
+                       $title = $this->getHTMLTitle();
                        $link = $wgRequest->escapeAppendQuery( 'feed=rss' );
-                       $ret .= "<link rel='alternate' type='application/rss+xml' title='RSS 2.0' href='$link' />\n";
+                       $ret .= "<link rel='alternate' type='application/rss+xml' title='$title' href='$link' />\n";
                        $link = $wgRequest->escapeAppendQuery( 'feed=atom' );
-                       $ret .= "<link rel='alternate' type='application/atom+xml' title='Atom 1.0' href='$link' />\n";
+                       $ret .= "<link rel='alternate' type='application/atom+xml' title='$title' href='$link' />\n";
                }
 
                return $ret;