X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FFeed.php;h=8bfe1c7ef9c1082982aa2d1da0b09dec9955004d;hb=53779578b44575ef91feb3fad488f09b52f737d7;hp=600b136d861feeb13de278326519bb55f3e9eb2f;hpb=71f27c7d4b8631d17e1a75b63f527d8afe9d38b0;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' ); }