Mattflaschen has submitted this change and it was merged.
Change subject: Fix sequence issue with /signup URL form
......................................................................
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
---
M includes/specials/SpecialUserlogin.php
1 file changed, 10 insertions(+), 5 deletions(-)
Approvals:
Mattflaschen: Looks good to me, approved
diff --git a/includes/specials/SpecialUserlogin.php
b/includes/specials/SpecialUserlogin.php
index a86c356..41c63b6 100644
--- a/includes/specials/SpecialUserlogin.php
+++ b/includes/specials/SpecialUserlogin.php
@@ -141,8 +141,6 @@
$this->mReturnTo = '';
$this->mReturnToQuery = '';
}
-
- $this->mShowVForm = $this->shouldShowVForm();
}
function getDescription() {
@@ -160,17 +158,24 @@
}
}
- 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;
--
To view, visit https://gerrit.wikimedia.org/r/58854
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ida615a1039bfa1d8328f5fda24c4e3da66b9d162
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
Gerrit-Reviewer: Mattflaschen <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: Spage <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits