X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_del%27%2C%20idvote=vote.voteid%29%20%7D%7D?a=blobdiff_plain;f=includes%2FFeed.php;h=8bfe1c7ef9c1082982aa2d1da0b09dec9955004d;hb=8850f3ae7bba7f9867f1217cd6a96608cc4f7d68;hp=600b136d861feeb13de278326519bb55f3e9eb2f;hpb=4f1067e27efe648e6089ab0b28fac1b2c3481816;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Feed.php b/includes/Feed.php index 600b136d86..8bfe1c7ef9 100644 --- a/includes/Feed.php +++ b/includes/Feed.php @@ -141,7 +141,7 @@ class FeedItem { */ public function getLanguage() { global $wgLanguageCode; - return $wgLanguageCode; + return wfBCP47( $wgLanguageCode ); } /** @@ -248,12 +248,12 @@ abstract class ChannelFeed extends FeedItem { global $wgRequest; $ctype = $wgRequest->getVal( 'ctype', 'application/xml' ); - $allowedctypes = array( + $allowedctypes = [ 'application/xml', 'text/xml', 'application/rss+xml', 'application/atom+xml' - ); + ]; return ( in_array( $ctype, $allowedctypes ) ? $ctype : 'application/xml' ); }