* New hook ResetSessionID, called when the session id is reset.
* Add a mode parameter to <gallery> tag with potential options of "traditional",
"nolines", "packed", "packed-overlay", or "packed-hover".
+* (bug 47399) A success message is now displayed after changing the password.
=== Bug fixes in 1.22 ===
* Disable Special:PasswordReset when $wgEnableEmail is false. Previously one
}
if ( $request->wasPosted() && $request->getBool( 'wpCancel' ) ) {
- $this->doReturnTo();
+ $titleObj = Title::newFromText( $request->getVal( 'returnto' ) );
+ if ( !$titleObj instanceof Title ) {
+ $titleObj = Title::newMainPage();
+ }
+ $query = $request->getVal( 'returntoquery' );
+ $this->getOutput()->redirect( $titleObj->getFullURL( $query ) );
return;
}
$this->attemptReset( $this->mNewpass, $this->mRetype );
if ( $user->isLoggedIn() ) {
- $this->doReturnTo();
+ $this->getOutput()->wrapWikiMsg(
+ "<div class=\"successbox\"><strong>\n$1\n</strong></div>",
+ 'changepassword-success'
+ );
+ $this->getOutput()->returnToMain();
} else {
LoginForm::setLoginToken();
$token = LoginForm::getLoginToken();
$this->showForm();
}
- function doReturnTo() {
- $request = $this->getRequest();
- $titleObj = Title::newFromText( $request->getVal( 'returnto' ) );
- if ( !$titleObj instanceof Title ) {
- $titleObj = Title::newMainPage();
- }
- $query = $request->getVal( 'returntoquery' );
- $this->getOutput()->redirect( $titleObj->getFullURL( $query ) );
- }
-
/**
* @param $msg string
*/
'newpassword' => 'New password:',
'retypenew' => 'Retype new password:',
'resetpass_submit' => 'Set password and log in',
-'resetpass_success' => 'Your password has been changed successfully!
-Now logging you in...',
+'changepassword-success' => 'Your password has been changed successfully!',
'resetpass_forbidden' => 'Passwords cannot be changed',
'resetpass-no-info' => 'You must be logged in to access this page directly.',
'resetpass-submit-loggedin' => 'Change password',