r53763 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53762‎ | r53763 | r53764 >
Date:20:11, 25 July 2009
Author:ialex
Status:ok
Tags:
Comment:
* (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
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserlogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUserlogin.php
@@ -47,8 +47,7 @@
4848 * @param WebRequest $request A WebRequest object passed by reference
4949 */
5050 function LoginForm( &$request, $par = '' ) {
51 - global $wgLang, $wgHiddenPrefs, $wgEnableEmail;
52 - global $wgAuth, $wgRedirectOnLogin;
 51+ global $wgAuth, $wgHiddenPrefs, $wgEnableEmail, $wgRedirectOnLogin;
5352
5453 $this->mType = ( $par == 'signup' ) ? $par : $request->getText( 'type' ); # Check for [[Special:Userlogin/signup]]
5554 $this->mName = $request->getText( 'wpName' );
@@ -92,7 +91,8 @@
9392 $wgAuth->setDomain( $this->mDomain );
9493
9594 # 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' ) ) {
9797 $this->mReturnTo = '';
9898 $this->mReturnToQuery = '';
9999 }
Index: trunk/phase3/RELEASE-NOTES
@@ -333,6 +333,9 @@
334334 * (bug 19301) Duplicates entries in $wgAddGroups, $wgRemoveGroups,
335335 $wgGroupsAddToSelf and $wgGroupsRemoveFromSelf are no more displayed on
336336 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
337340
338341 == API changes in 1.16 ==
339342

Status & tagging log