Make Special:PasswordReset obey returnto and returntoquery parameters
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Tue, 19 Nov 2013 13:37:51 +0000 (14:37 +0100)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Tue, 19 Nov 2013 13:37:51 +0000 (14:37 +0100)
Bug: 57098

Change-Id: I27b31bfa23d94cd45a70b3c7c091938e3b83e671

RELEASE-NOTES-1.23
includes/specials/SpecialPasswordReset.php

index e8af684..a9a616e 100644 (file)
@@ -54,6 +54,7 @@ production.
 * (bug 56912) Show correct link color on cached result of Special:DeadendPages.
 * Classes TitleListDependency and TitleDependency have been removed, as they
   have been found unused in core and extensions for a long time.
+* (bug 57098) SpecialPasswordReset now obeys returnto parameter
 
 === API changes in 1.23 ===
 * (bug 54884) action=parse&prop=categories now indicates hidden and missing
index c486ba0..8e56574 100644 (file)
@@ -112,6 +112,8 @@ class SpecialPasswordReset extends FormSpecialPage {
                // from a FormSpecialPage class.
                $form->setWrapperLegend( false );
 
+               $form->addHiddenFields( $this->getRequest()->getValues( 'returnto', 'returntoquery' ) );
+
                $i = 0;
                if ( isset( $wgPasswordResetRoutes['username'] ) && $wgPasswordResetRoutes['username'] ) {
                        $i++;