From 5fba51ddab9c927f68245bd240a8a998dc549d50 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Tue, 11 May 2010 19:36:47 +0000 Subject: [PATCH] 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. --- includes/OutputPage.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; + } } /** -- 2.20.1