allow other content-types
authorGabriel Wicke <gwicke@users.mediawiki.org>
Fri, 29 Apr 2005 12:40:07 +0000 (12:40 +0000)
committerGabriel Wicke <gwicke@users.mediawiki.org>
Fri, 29 Apr 2005 12:40:07 +0000 (12:40 +0000)
includes/Feed.php

index e66032f..00e80b1 100644 (file)
@@ -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');
        }
        
        /**