From: Mark A. Hershberger Date: Tue, 11 May 2010 19:36:47 +0000 (+0000) Subject: Keep formats that are not in $wgAdvertisedFeedTypes from being advertised. Useful... X-Git-Tag: 1.31.0-rc.0~36890 X-Git-Url: http://git.cyclocoop.org//%27http:/code.google.com/p/ie7-js//%27?a=commitdiff_plain;h=5fba51ddab9c927f68245bd240a8a998dc549d50;p=lhc%2Fweb%2Fwiklou.git Keep formats that are not in $wgAdvertisedFeedTypes from being advertised. Useful for things like LiquidThreads that use this function to provide links without modifying third party modules to support wgAdvertisedFeedTypes. --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index a135166e66..d5e71f8852 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -643,7 +643,11 @@ class OutputPage { * @param $href String: URL */ public function addFeedLink( $format, $href ) { - $this->mFeedLinks[$format] = $href; + global $wgAdvertisedFeedTypes; + + if ( in_array( $format, $wgAdvertisedFeedTypes ) ) { + $this->mFeedLinks[$format] = $href; + } } /**