Index: trunk/extensions/LanguageSelector/LanguageSelector.php |
— | — | @@ -99,15 +99,15 @@ |
100 | 100 | $wgLanguageSelectorShowAll, $wgCommandLineMode; |
101 | 101 | global $wgUser, $wgLang, $wgRequest, $wgCookiePrefix, $wgCookiePath, $wgHooks; |
102 | 102 | |
103 | | - if ( $wgCommandLineMode ) { |
104 | | - return true; |
105 | | - } |
106 | | - |
107 | 103 | if ( $wgLanguageSelectorLanguages === null ) { |
108 | 104 | $wgLanguageSelectorLanguages = array_keys( Language::getLanguageNames( !$wgLanguageSelectorShowAll ) ); |
109 | 105 | sort( $wgLanguageSelectorLanguages ); |
110 | 106 | } |
111 | 107 | |
| 108 | + if ( $wgCommandLineMode ) { |
| 109 | + return true; |
| 110 | + } |
| 111 | + |
112 | 112 | $setlang = $wgRequest->getVal( 'setlang' ); |
113 | 113 | if ( $setlang && !in_array( $setlang, $wgLanguageSelectorLanguages ) ) |
114 | 114 | $setlang = null; //ignore invalid |