r40897 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40896‎ | r40897 | r40898 >
Date:03:58, 16 September 2008
Author:soxred93
Status:old
Tags:
Comment:
(bug 15617)
$wgFeedClassesOutputPage::getHeadLinks() respects $wgFeedClasses, instead of hardcoding rss and atom.
Patch by Juliano F. Ravasi.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -1533,7 +1533,7 @@
15341534 # or "Breaking news" one). For this, we see if $wgOverrideSiteFeed is defined.
15351535 # If so, use it instead.
15361536
1537 - global $wgOverrideSiteFeed, $wgSitename;
 1537+ global $wgOverrideSiteFeed, $wgSitename, $wgFeedClasses;
15381538 $rctitle = SpecialPage::getTitleFor( 'Recentchanges' );
15391539
15401540 if ( $wgOverrideSiteFeed ) {
@@ -1545,14 +1545,12 @@
15461546 }
15471547 }
15481548 else if ( $wgTitle->getPrefixedText() != $rctitle->getPrefixedText() ) {
1549 - $tags[] = $this->feedLink(
1550 - 'rss',
1551 - $rctitle->getFullURL( 'feed=rss' ),
1552 - wfMsg( 'site-rss-feed', $wgSitename ) );
1553 - $tags[] = $this->feedLink(
1554 - 'atom',
1555 - $rctitle->getFullURL( 'feed=atom' ),
1556 - wfMsg( 'site-atom-feed', $wgSitename ) );
 1549+ foreach( $wgFeedClasses as $format => $class ) {
 1550+ $tags[] = $this->feedLink(
 1551+ $format,
 1552+ $rctitle->getFullURL( "feed={$format}" ),
 1553+ wfMsg( "site-{$format}-feed", $wgSitename ) ); # For grep: 'site-rss-feed', 'site-atom-feed'.
 1554+ }
15571555 }
15581556 }
15591557
Index: trunk/phase3/RELEASE-NOTES
@@ -206,6 +206,7 @@
207207 even if there are broken link records with source article id 0 in the database
208208 * (bug 15598) Special:Newpages default limit uses user preference for recentchanges
209209 limit instead of hardcoded 50.
 210+* (bug 15617) $wgFeedClassesOutputPage::getHeadLinks() respects $wgFeedClasses, instead of hardcoding rss and atom. Patch by Juliano F. Ravasi.
210211
211212 === API changes in 1.14 ===
212213