From: Alexandre Emsenhuber Date: Sat, 25 Jul 2009 20:11:01 +0000 (+0000) Subject: * (bug 18799) Special:Userlogin now handles correctly the returnto parameter to not... X-Git-Tag: 1.31.0-rc.0~40718 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=a4abe39f2ff015df522154e56e6d3b1774bf9769;p=lhc%2Fweb%2Fwiklou.git * (bug 18799) Special:Userlogin now handles correctly the returnto parameter to not link back to Special:Userlogout when user's language isn't the same as content's language --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index e3facecd70..9fafa8d3f3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -333,6 +333,9 @@ this. Was used when mwEmbed was going to be an extension. * (bug 19301) Duplicates entries in $wgAddGroups, $wgRemoveGroups, $wgGroupsAddToSelf and $wgGroupsRemoveFromSelf are no more displayed on Special:ListGroupRights +* (bug 18799) Special:Userlogin now handles correctly the returnto parameter + to not link back to Special:Userlogout when user's language isn't the same as + content's language == API changes in 1.16 == diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 3af372d8a2..2aa6977e8b 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -47,8 +47,7 @@ class LoginForm { * @param WebRequest $request A WebRequest object passed by reference */ function LoginForm( &$request, $par = '' ) { - global $wgLang, $wgHiddenPrefs, $wgEnableEmail; - global $wgAuth, $wgRedirectOnLogin; + global $wgAuth, $wgHiddenPrefs, $wgEnableEmail, $wgRedirectOnLogin; $this->mType = ( $par == 'signup' ) ? $par : $request->getText( 'type' ); # Check for [[Special:Userlogin/signup]] $this->mName = $request->getText( 'wpName' ); @@ -92,7 +91,8 @@ class LoginForm { $wgAuth->setDomain( $this->mDomain ); # When switching accounts, it sucks to get automatically logged out - if( $this->mReturnTo == $wgLang->specialPage( 'Userlogout' ) ) { + $returnToTitle = Title::newFromText( $this->mReturnTo ); + if( is_object( $returnToTitle ) && $returnToTitle->isSpecial( 'Userlogout' ) ) { $this->mReturnTo = ''; $this->mReturnToQuery = ''; }