From ecb52dea11a2c2b05f741d220c8682f0d0b47a71 Mon Sep 17 00:00:00 2001 From: Matthew Flaschen Date: Fri, 12 Apr 2013 01:10:53 -0400 Subject: [PATCH] Fix sequence issue with /signup URL form /signup subpage affects form display and title (just like ?type=signup), so check for it earlier in execute(). Also rename execute()'s $par parameter to $subPage to match SubPage.php. Change-Id: Ida615a1039bfa1d8328f5fda24c4e3da66b9d162 --- includes/specials/SpecialUserlogin.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index a86c3567f2..41c63b6c31 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -141,8 +141,6 @@ class LoginForm extends SpecialPage { $this->mReturnTo = ''; $this->mReturnToQuery = ''; } - - $this->mShowVForm = $this->shouldShowVForm(); } function getDescription() { @@ -160,17 +158,24 @@ class LoginForm extends SpecialPage { } } - public function execute( $par ) { + /* + * @param $subPage string|null + */ + public function execute( $subPage ) { if ( session_id() == '' ) { wfSetupSession(); } $this->load(); - $this->setHeaders(); - if ( $par == 'signup' ) { # Check for [[Special:Userlogin/signup]] + // Check for [[Special:Userlogin/signup]. This affects form display and + // page title. + if ( $subPage == 'signup' ) { $this->mType = 'signup'; } + $this->mShowVForm = $this->shouldShowVForm(); + + $this->setHeaders(); // If logging in and not on HTTPS, either redirect to it or offer a link. global $wgSecureLogin; -- 2.20.1