Bartosz Dziewoński has uploaded a new change for review.
https://gerrit.wikimedia.org/r/156182
Change subject: Remove dead code for showing login form to logged-in users
......................................................................
Remove dead code for showing login form to logged-in users
Since d0439af8, trying to view the login form while logged-in just
redirects to the 'returnto' address (or the main page), so this code
is unreachable.
Change-Id: I9ab8ab83172063d8facc491042832513d27f876b
---
M includes/specials/SpecialUserlogin.php
M includes/templates/Userlogin.php
M languages/i18n/en.json
M resources/src/mediawiki.special/mediawiki.special.userlogin.login.css
4 files changed, 3 insertions(+), 21 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/82/156182/1
diff --git a/includes/specials/SpecialUserlogin.php
b/includes/specials/SpecialUserlogin.php
index afa12a0..c156a5d 100644
--- a/includes/specials/SpecialUserlogin.php
+++ b/includes/specials/SpecialUserlogin.php
@@ -1374,7 +1374,6 @@
$template->set( 'cansecurelogin', ( $wgSecureLogin === true ) );
$template->set( 'stickhttps', (int)$this->mStickHTTPS );
$template->set( 'loggedin', $user->isLoggedIn() );
- $template->set( 'loggedinuser', $user->getName() );
if ( $this->mType == 'signup' ) {
if ( !self::getCreateaccountToken() ) {
diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php
index 8bba426..ad01905 100644
--- a/includes/templates/Userlogin.php
+++ b/includes/templates/Userlogin.php
@@ -37,11 +37,6 @@
<?php } ?>
<div id="userloginForm">
<form name="userlogin" class="mw-ui-vform" method="post"
action="<?php $this->text( 'action' ); ?>">
- <?php if ( $this->data['loggedin'] ) { ?>
- <div class="warningbox">
- <?php echo $this->getMsg(
'userlogin-loggedin' )->params( $this->data['loggedinuser'] )->parse(); ?>
- </div>
- <?php } ?>
<section class="mw-form-header">
<?php $this->html( 'header' ); /* extensions
such as ConfirmEdit add form HTML here */ ?>
</section>
@@ -171,15 +166,9 @@
</div>
<?php if ( $this->haveData( 'createOrLoginHref' ) ) { ?>
- <?php if ( $this->data['loggedin'] ) { ?>
- <div id="mw-createaccount-another">
- <a href="<?php $this->text(
'createOrLoginHref' ); ?>" id="mw-createaccount-join" tabindex="7"
class="mw-ui-button"><?php $this->msg( 'userlogin-createanother' ); ?></a>
- </div>
- <?php } else { ?>
- <div id="mw-createaccount-cta">
- <?php $this->msg(
'userlogin-noaccount' ); ?><a href="<?php $this->text( 'createOrLoginHref' );
?>" id="mw-createaccount-join" tabindex="7" class="mw-ui-button
mw-ui-progressive"><?php $this->msg( 'userlogin-joinproject' ); ?></a>
- </div>
- <?php } ?>
+ <div id="mw-createaccount-cta">
+ <?php $this->msg( 'userlogin-noaccount'
); ?><a href="<?php $this->text( 'createOrLoginHref' ); ?>"
id="mw-createaccount-join" tabindex="7" class="mw-ui-button
mw-ui-progressive"><?php $this->msg( 'userlogin-joinproject' ); ?></a>
+ </div>
<?php } ?>
<?php if ( $this->haveData( 'uselang' ) ) { ?><input
type="hidden" name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php
} ?>
<?php if ( $this->haveData( 'token' ) ) { ?><input
type="hidden" name="wpLoginToken" value="<?php $this->text( 'token' ); ?>"
/><?php } ?>
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index e160327..d6d22ff 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -406,8 +406,6 @@
"userlogin-resetpassword-link": "Forgot your password?",
"helplogin-url":
"https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Logging_in",
"userlogin-helplink2": "Help with logging in",
- "userlogin-loggedin": "You are already logged in as
{{GENDER:$1|$1}}.\nUse the form below to log in as another user.",
- "userlogin-createanother": "Create another account",
"createacct-emailrequired": "Email address",
"createacct-emailoptional": "Email address (optional)",
"createacct-email-ph": "Enter your email address",
diff --git
a/resources/src/mediawiki.special/mediawiki.special.userlogin.login.css
b/resources/src/mediawiki.special/mediawiki.special.userlogin.login.css
index 64471b2..ee6a57c 100644
--- a/resources/src/mediawiki.special/mediawiki.special.userlogin.login.css
+++ b/resources/src/mediawiki.special/mediawiki.special.userlogin.login.css
@@ -6,10 +6,6 @@
background: url(images/glyph-people-large.png) no-repeat 50%;
margin: 0 auto;
padding-top: 4em;
-}
-
-#mw-createaccount-cta,
-#mw-createaccount-another {
font-size: 0.9em;
font-weight: normal;
text-align: center;
--
To view, visit https://gerrit.wikimedia.org/r/156182
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ab8ab83172063d8facc491042832513d27f876b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits