empt all content namespaces.)
* $wgForwardSearchUrl has been removed entirely. Documented setting since 1.4
has been $wgSearchForwardUrl.
+* (bug 15040) $wgOverrideSiteFeed has been added. Setting either $wgSiteFeed['rss']
+ or 'atom' to a URL will override the default Recent Changes feed that appears on
+ all pages.
=== New features in 1.14 ===
* pages larger than this size. */
$wgFeedDiffCutoff = 32768;
+/** Override the site's default RSS/ATOM feed for recentchanges that appears on
+ * every page. 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).
+ * Ex: $wgSiteFeed['format'] = "http://example.com/somefeed.xml"; Format can be one
+ * of either 'rss' or 'atom'.
+ */
+$wgOverrideSiteFeed = array();
/**
* Additional namespaces. If the namespaces defined in Language.php and
# 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.
-
+ # 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 ( $wgTitle->getPrefixedText() != $rctitle->getPrefixedText() ) {
- global $wgSitename;
-
+
+ if ( isset( $wgOverrideSiteFeed['rss'] ) || isset( $wgOverrideSiteFeed['atom'] ) ) {
+ 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' ),