* (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 ==
* @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' );
$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 = '';
}