Index: trunk/extensions/LanguageSelector/LanguageSelector.php |
— | — | @@ -261,13 +261,13 @@ |
262 | 262 | |
263 | 263 | function wfLanguageSelectorDetectLanguage( $mode ) { |
264 | 264 | global $wgContLang, $wgLanguageSelectorLanguages; |
265 | | - |
| 265 | + |
| 266 | + $contLang = $wgContLang->getCode(); |
| 267 | + |
266 | 268 | if ( !$mode || $mode == LANGUAGE_SELECTOR_USE_CONTENT_LANG ) { |
267 | 269 | return $contLang; |
268 | 270 | } |
269 | 271 | |
270 | | - $contLang = $wgContLang->getCode(); |
271 | | - |
272 | 272 | /** |
273 | 273 | * get accepted languages from Accept-Languages |
274 | 274 | * HTTP header. |
— | — | @@ -277,7 +277,7 @@ |
278 | 278 | if ( empty( $accept ) ) |
279 | 279 | return $contLang; |
280 | 280 | |
281 | | - $accept = split( ',', $accept ); |
| 281 | + $accept = explode( ',', $accept ); |
282 | 282 | |
283 | 283 | /** |
284 | 284 | * normalize accepted languages |