From: Chad Horohoe Date: Thu, 12 Jun 2008 00:51:04 +0000 (+0000) Subject: (bug 14500) - The sitefeed (RC) shouldn't show up on Recentchanges itself. X-Git-Tag: 1.31.0-rc.0~47037 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=d78c937642af9298015d6199f14c9f66052feb3b;p=lhc%2Fweb%2Fwiklou.git (bug 14500) - The sitefeed (RC) shouldn't show up on Recentchanges itself. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 398dad12c9..e103b1a191 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -364,7 +364,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 14479) MediaWiki:upload-maxfilesize should have a div id wrapper * (bug 14497) Throw visible errors in installer scripts when SQL files fail due to database permission or other error - +* (bug 14500) Site feed (Recentchanges) no longer shows up on the actual + recent changes page. === API changes in 1.13 === diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 351b2b429e..0e501d00d6 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1419,12 +1419,12 @@ class OutputPage { } 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. - global $wgTitle; $ret .= $this->feedLink( $format, @@ -1432,19 +1432,24 @@ class OutputPage { 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 - # Put it after the per-page feed to avoid changing existing behavior. - # It's still available, probably via a menu in your browser. - global $wgSitename; + # 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. + $rctitle = SpecialPage::getTitleFor( 'Recentchanges' ); - $ret .= $this->feedLink( - 'rss', - $rctitle->getFullURL( 'feed=rss' ), - wfMsg( 'site-rss-feed', $wgSitename ) ); - $ret .= $this->feedLink( - 'atom', - $rctitle->getFullURL( 'feed=atom' ), - wfMsg( 'site-atom-feed', $wgSitename ) ); + if ( $wgTitle->getText() != $rctitle->getText() ) { + global $wgSitename; + + $ret .= $this->feedLink( + 'rss', + $rctitle->getFullURL( 'feed=rss' ), + wfMsg( 'site-rss-feed', $wgSitename ) ); + $ret .= $this->feedLink( + 'atom', + $rctitle->getFullURL( 'feed=atom' ), + wfMsg( 'site-atom-feed', $wgSitename ) ); + } } return $ret;