dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e2aa937
)
Fix bug #7605. For logged-in users use the selected variant(if any) insted the one...
author
Robert Stojnić
<rainman@users.mediawiki.org>
Sun, 22 Oct 2006 01:24:39 +0000
(
01:24
+0000)
committer
Robert Stojnić
<rainman@users.mediawiki.org>
Sun, 22 Oct 2006 01:24:39 +0000
(
01:24
+0000)
includes/StubObject.php
patch
|
blob
|
history
diff --git
a/includes/StubObject.php
b/includes/StubObject.php
index
8731670
..
4068c31
100644
(file)
--- a/
includes/StubObject.php
+++ b/
includes/StubObject.php
@@
-92,6
+92,15
@@
class StubUserLang extends StubObject {
$code = $wgRequest->getVal('uselang', '');
if ($code == '')
$code = $wgUser->getOption('language');
+
+ // if variant is explicitely selected, use it instead the one from wgUser
+ // see bug #7605
+ if($wgContLang->hasVariants()){
+ $variant = $wgContLang->getPreferredVariant(false);
+ if($variant != $wgContLanguageCode)
+ $code = $variant;
+ }
+
# Validate $code
if( empty( $code ) || !preg_match( '/^[a-z]+(-[a-z]+)?$/', $code ) ) {
$code = $wgContLanguageCode;