Index: trunk/phase3/includes/StubObject.php |
— | — | @@ -147,7 +147,7 @@ |
148 | 148 | |
149 | 149 | // if variant is explicitely selected, use it instead the one from wgUser |
150 | 150 | // see bug #7605 |
151 | | - if( $wgContLang->hasVariants() && $code == $wgContLanguageCode ){ |
| 151 | + if( $wgContLang->hasVariants() && in_array($code, $wgContLang->getVariants()) ){ |
152 | 152 | $variant = $wgContLang->getPreferredVariant(); |
153 | 153 | if( $variant != $wgContLanguageCode ) |
154 | 154 | $code = $variant; |
Index: trunk/phase3/languages/LanguageConverter.php |
— | — | @@ -131,7 +131,7 @@ |
132 | 132 | $defaultUserLang = $this->mMainLanguageCode; |
133 | 133 | $userLang = $wgRequest->getVal( 'uselang', $defaultUserLang ); |
134 | 134 | // see if interface language is same as content, if not, prevent conversion |
135 | | - if( $this->mMainLanguageCode != $userLang ){ |
| 135 | + if( ! in_array( $userLang, $this->mVariants ) ){ |
136 | 136 | $this->mPreferredVariant = $this->mMainLanguageCode; // no conversion |
137 | 137 | return $this->mPreferredVariant; |
138 | 138 | } |