* (bug 13463) Login successful page doesn't use user's preferred interface language
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 5 Apr 2008 20:01:53 +0000 (20:01 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 5 Apr 2008 20:01:53 +0000 (20:01 +0000)
RELEASE-NOTES
includes/SpecialUserlogin.php

index a79ea1d..4c8f92e 100644 (file)
@@ -152,6 +152,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 13441) Allow Special:Recentchanges to show bots only
 * (bug 13431) Show true message source in Special:Allmessages&ot=php / xml
 * (bug 13616) Replace underscores in search terms by spaces
+* (bug 13463) Login successful page doesn't use user's preferred interface language
 
 === API changes in 1.13 ===
 
index 72daf89..211a9c1 100644 (file)
@@ -457,6 +457,11 @@ class LoginForm {
                                $wgUser->setCookies();
 
                                if( $this->hasSessionCookie() ) {
+                                       /* Replace the language object to provide user interface in correct
+                                        * language immediately on this first page load.
+                                        */
+                                       global $wgLang;
+                                       $wgLang = Language::factory( $wgUser->getOption( 'language' ) );
                                        return $this->successfulLogin( wfMsg( 'loginsuccess', $wgUser->getName() ) );
                                } else {
                                        return $this->cookieRedirectCheck( 'login' );