jenkins-bot has submitted this change and it was merged.

Change subject: Always preserve uselang in login form
......................................................................


Always preserve uselang in login form

If $wgLoginLanguageSelector is false, we don't show the language
selector; but there's no reason to ignore a uselang URL parameter.

Change-Id: I66c3c2cf50d4071e82bfe736dfe5480686d763f3
---
M includes/specialpage/LoginSignupSpecialPage.php
1 file changed, 6 insertions(+), 6 deletions(-)

Approvals:
  Anomie: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specialpage/LoginSignupSpecialPage.php 
b/includes/specialpage/LoginSignupSpecialPage.php
index a95716a..73a1bdd 100644
--- a/includes/specialpage/LoginSignupSpecialPage.php
+++ b/includes/specialpage/LoginSignupSpecialPage.php
@@ -641,7 +641,7 @@
         * @return HTMLForm
         */
        protected function getAuthForm( array $requests, $action, $msg = '', 
$msgType = 'error' ) {
-               global $wgSecureLogin, $wgLoginLanguageSelector;
+               global $wgSecureLogin;
                // FIXME merge this with parent
 
                if ( isset( $this->authForm ) ) {
@@ -667,7 +667,7 @@
                $form = HTMLForm::factory( 'vform', $formDescriptor, $context );
 
                $form->addHiddenField( 'authAction', $this->authAction );
-               if ( $wgLoginLanguageSelector && $this->mLanguage ) {
+               if ( $this->mLanguage ) {
                        $form->addHiddenField( 'uselang', $this->mLanguage );
                }
                $form->addHiddenField( 'force', $this->securityLevel );
@@ -702,7 +702,7 @@
         */
        protected function getFakeTemplate( $msg, $msgType ) {
                global $wgAuth, $wgEnableEmail, $wgHiddenPrefs, 
$wgEmailConfirmToEdit, $wgEnableUserEmail,
-                          $wgSecureLogin, $wgLoginLanguageSelector, 
$wgPasswordResetRoutes;
+                          $wgSecureLogin, $wgPasswordResetRoutes;
 
                // make a best effort to get the value of fields which used to 
be fixed in the old login
                // template but now might or might not exist depending on what 
providers are used
@@ -760,7 +760,7 @@
                # Don't show a "create account" link if the user can't.
                if ( $this->showCreateAccountLink() ) {
                        # Pass any language selection on to the mode switch link
-                       if ( $wgLoginLanguageSelector && $this->mLanguage ) {
+                       if ( $this->mLanguage ) {
                                $linkq .= '&uselang=' . $this->mLanguage;
                        }
                        // Supply URL, login template creates the button.
@@ -892,7 +892,7 @@
         * @return array
         */
        protected function getFieldDefinitions( $template ) {
-               global $wgEmailConfirmToEdit, $wgLoginLanguageSelector;
+               global $wgEmailConfirmToEdit;
 
                $isLoggedIn = $this->getUser()->isLoggedIn();
                $continuePart = $this->isContinued() ? 'continue-' : '';
@@ -1148,7 +1148,7 @@
                                $linkTitle = $this->getTitleFor( 
$this->isSignup() ? 'Userlogin' :'CreateAccount' );
                                $linkq = 
$this->getReturnToQueryStringFragment();
                                // Pass any language selection on to the mode 
switch link
-                               if ( $wgLoginLanguageSelector && 
$this->mLanguage ) {
+                               if ( $this->mLanguage ) {
                                        $linkq .= '&uselang=' . 
$this->mLanguage;
                                }
                                $loggedIn = $this->getUser()->isLoggedIn();

-- 
To view, visit https://gerrit.wikimedia.org/r/323498
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I66c3c2cf50d4071e82bfe736dfe5480686d763f3
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: GergÅ‘ Tisza <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to