Index: branches/REL1_5/phase3/includes/Setup.php |
— | — | @@ -217,7 +217,7 @@ |
218 | 218 | if ($wgLanguageCode == '') |
219 | 219 | $wgLanguageCode = $wgUser->getOption('language'); |
220 | 220 | # Validate $wgLanguageCode, which will soon be sent to an eval() |
221 | | -if( empty( $wgLanguageCode ) || preg_match( '/^[^a-z-]*$/', $wgLanguageCode ) ) { |
| 221 | +if( empty( $wgLanguageCode ) || !preg_match( '/^[a-z]+(-[a-z]+)?$/', $wgLanguageCode ) ) { |
222 | 222 | $wgLanguageCode = $wgContLanguageCode; |
223 | 223 | } |
224 | 224 | |