From: Thomas Gries Date: Sat, 11 Feb 2012 23:46:37 +0000 (+0000) Subject: Aashish's fix for bug33997 (SpecialPasswordReset does not always has the correct... X-Git-Tag: 1.31.0-rc.0~24766 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=ae45f1f5b0dd4bd4dd2296e03ae653b639c5f8d2;p=lhc%2Fweb%2Fwiklou.git Aashish's fix for bug33997 (SpecialPasswordReset does not always has the correct returnto= page on the login / create account portlet and returns to SpecialPasswortReset instead to Main page ) --- diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index cb3e8792d4..b44700cbec 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -133,9 +133,13 @@ class LoginForm extends SpecialPage { } $wgAuth->setDomain( $this->mDomain ); - # When switching accounts, it sucks to get automatically logged out + # 1. When switching accounts, it sucks to get automatically logged out + # 2. Do not return to PasswordReset after a successful password change + # but goto Wiki start page (Main_Page) instead ( bug 33997 ) $returnToTitle = Title::newFromText( $this->mReturnTo ); - if( is_object( $returnToTitle ) && $returnToTitle->isSpecial( 'Userlogout' ) ) { + if( is_object( $returnToTitle ) && ( + $returnToTitle->isSpecial( 'Userlogout' ) + || $returnToTitle->isSpecial( 'PasswordReset' ) ) ) { $this->mReturnTo = ''; $this->mReturnToQuery = ''; }