Index: trunk/phase3/includes/specials/SpecialUserlogin.php |
— | — | @@ -47,8 +47,7 @@ |
48 | 48 | * @param WebRequest $request A WebRequest object passed by reference |
49 | 49 | */ |
50 | 50 | function LoginForm( &$request, $par = '' ) { |
51 | | - global $wgLang, $wgHiddenPrefs, $wgEnableEmail; |
52 | | - global $wgAuth, $wgRedirectOnLogin; |
| 51 | + global $wgAuth, $wgHiddenPrefs, $wgEnableEmail, $wgRedirectOnLogin; |
53 | 52 | |
54 | 53 | $this->mType = ( $par == 'signup' ) ? $par : $request->getText( 'type' ); # Check for [[Special:Userlogin/signup]] |
55 | 54 | $this->mName = $request->getText( 'wpName' ); |
— | — | @@ -92,7 +91,8 @@ |
93 | 92 | $wgAuth->setDomain( $this->mDomain ); |
94 | 93 | |
95 | 94 | # When switching accounts, it sucks to get automatically logged out |
96 | | - if( $this->mReturnTo == $wgLang->specialPage( 'Userlogout' ) ) { |
| 95 | + $returnToTitle = Title::newFromText( $this->mReturnTo ); |
| 96 | + if( is_object( $returnToTitle ) && $returnToTitle->isSpecial( 'Userlogout' ) ) { |
97 | 97 | $this->mReturnTo = ''; |
98 | 98 | $this->mReturnToQuery = ''; |
99 | 99 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -333,6 +333,9 @@ |
334 | 334 | * (bug 19301) Duplicates entries in $wgAddGroups, $wgRemoveGroups, |
335 | 335 | $wgGroupsAddToSelf and $wgGroupsRemoveFromSelf are no more displayed on |
336 | 336 | Special:ListGroupRights |
| 337 | +* (bug 18799) Special:Userlogin now handles correctly the returnto parameter |
| 338 | + to not link back to Special:Userlogout when user's language isn't the same as |
| 339 | + content's language |
337 | 340 | |
338 | 341 | == API changes in 1.16 == |
339 | 342 | |