- $p = $this->mRobotpolicy;
- if( $p !== '' && $p != 'index,follow' ) {
- // http://www.robotstxt.org/wc/meta-user.html
- // Only show if it's different from the default robots policy
- $ret .= "<meta name=\"robots\" content=\"$p\" />\n";
+ if( $wgFeed ) {
+ global $wgTitle;
+ foreach( $this->getSyndicationLinks() as $format => $link ) {
+ # Use the page name for the title (accessed through $wgTitle since
+ # there's no other way). In principle, this could lead to issues
+ # with having the same name for different feeds corresponding to
+ # the same page, but we can't avoid that at this low a level.
+
+ $tags[] = $this->feedLink(
+ $format,
+ $link,
+ wfMsg( "page-{$format}-feed", $wgTitle->getPrefixedText() ) ); # Used messages: 'page-rss-feed' and 'page-atom-feed' (for an easier grep)
+ }
+
+ # Recent changes feed should appear on every page (except recentchanges,
+ # that would be redundant). Put it after the per-page feed to avoid
+ # changing existing behavior. It's still available, probably via a
+ # menu in your browser. Some sites might have a different feed they'd
+ # like to promote instead of the RC feed (maybe like a "Recent New Articles"
+ # or "Breaking news" one). For this, we see if $wgOverrideSiteFeed is defined.
+ # If so, use it instead.
+
+ global $wgOverrideSiteFeed, $wgSitename;
+ $rctitle = SpecialPage::getTitleFor( 'Recentchanges' );
+
+ if ( $wgOverrideSiteFeed ) {
+ foreach ( $wgOverrideSiteFeed as $type => $feedUrl ) {
+ $tags[] = $this->feedLink (
+ $type,
+ htmlspecialchars( $feedUrl ),
+ wfMsg( "site-{$type}-feed", $wgSitename ) );
+ }
+ }
+ else if ( $wgTitle->getPrefixedText() != $rctitle->getPrefixedText() ) {
+ $tags[] = $this->feedLink(
+ 'rss',
+ $rctitle->getFullURL( 'feed=rss' ),
+ wfMsg( 'site-rss-feed', $wgSitename ) );
+ $tags[] = $this->feedLink(
+ 'atom',
+ $rctitle->getFullURL( 'feed=atom' ),
+ wfMsg( 'site-atom-feed', $wgSitename ) );
+ }