From 8087dfc65791f60f20a34354632d7e78adedf6c1 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Fri, 29 Apr 2005 12:40:07 +0000 Subject: [PATCH] allow other content-types --- includes/Feed.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/Feed.php b/includes/Feed.php index e66032fd9e..00e80b1e11 100644 --- a/includes/Feed.php +++ b/includes/Feed.php @@ -158,7 +158,10 @@ class ChannelFeed extends FeedItem { * @access private */ function contentType() { - return 'application/xml'; + global $wgRequest; + $ctype = $wgRequest->getVal('ctype','application/xml'); + $allowedctypes = array('application/xml','text/xml','application/rss+xml','application/atom+xml'); + return (in_array($ctype, $allowedctypes) ? $ctype : 'application/xml'); } /** -- 2.20.1