From: Niklas Laxström Date: Fri, 14 Aug 2009 15:41:48 +0000 (+0000) Subject: (bug 20090) BCP 47 issues X-Git-Tag: 1.31.0-rc.0~40307 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=72a3e109d9e49d006f1e27a72bdb63d4f59af31a;p=lhc%2Fweb%2Fwiklou.git (bug 20090) BCP 47 issues --- diff --git a/includes/StubObject.php b/includes/StubObject.php index 6b60708d17..e6cbd7856d 100644 --- a/includes/StubObject.php +++ b/includes/StubObject.php @@ -148,6 +148,8 @@ class StubUserLang extends StubObject { function _newObject() { global $wgContLanguageCode, $wgRequest, $wgUser, $wgContLang; $code = $wgRequest->getVal( 'uselang', $wgUser->getOption( 'language' ) ); + // BCP 47 - letter case MUST NOT carry meaning + $code = strtolower( $code ); # Validate $code if( empty( $code ) || !preg_match( '/^[a-z-]+$/', $code ) || ( $code === 'qqq' ) ) {