From: Gabriel Wicke Date: Fri, 29 Apr 2005 12:40:07 +0000 (+0000) Subject: allow other content-types X-Git-Tag: 1.5.0alpha1~76 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=8087dfc65791f60f20a34354632d7e78adedf6c1;p=lhc%2Fweb%2Fwiklou.git allow other content-types --- 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'); } /**