From: Ævar Arnfjörð Bjarmason Date: Wed, 25 May 2005 01:36:38 +0000 (+0000) Subject: * - is not a metacharacter in regular expressions, and ^ can be used to invert X-Git-Tag: 1.5.0alpha2~86 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=992b2c4cc80c176ded269d8ae83c6c229d9005ff;p=lhc%2Fweb%2Fwiklou.git * - is not a metacharacter in regular expressions, and ^ can be used to invert matches within [] --- diff --git a/includes/Setup.php b/includes/Setup.php index 0db7307cb2..657dce71ba 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -218,7 +218,7 @@ if( !$wgUser->mDataLoaded ) { // wgLanguageCode now specifically means the UI language $wgLanguageCode = $wgUser->getOption('language'); # Validate $wgLanguageCode, which will soon be sent to an eval() -if( empty( $wgLanguageCode ) || !preg_match( '/^[a-z\-]*$/', $wgLanguageCode ) ) { +if( empty( $wgLanguageCode ) || preg_match( '/^[^a-z-]*$/', $wgLanguageCode ) ) { $wgLanguageCode = $wgContLanguageCode; }