Waldir has uploaded a new change for review. https://gerrit.wikimedia.org/r/65554
Change subject: Rename variable _AdminPassword2 to _AdminPasswordConfirm for clarity ...................................................................... Rename variable _AdminPassword2 to _AdminPasswordConfirm for clarity Change-Id: Ica04efb07014d0e7c91ae69c1a7ba5e00c0b16c2 --- M includes/installer/Installer.php M includes/installer/WebInstallerPage.php M tests/selenium/installer/MediaWikiErrorsNamepageTestCase.php M tests/selenium/installer/MediaWikiInstallationCommonFunction.php M tests/selenium/installer/MediaWikiUserInterfaceTestCase.php 5 files changed, 13 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/54/65554/1 diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index b1517e4..1a4acc5 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -187,7 +187,7 @@ '_NamespaceType' => 'site-name', '_AdminName' => '', // will be set later, when the user selects language '_AdminPassword' => '', - '_AdminPassword2' => '', + '_AdminPasswordConfirm' => '', '_AdminEmail' => '', '_Subscribe' => false, '_SkipOptional' => 'continue', diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index 8a9fc2d..f9485f9 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -695,7 +695,7 @@ 'label' => 'config-admin-password', ) ) . $this->parent->getPasswordBox( array( - 'var' => '_AdminPassword2', + 'var' => '_AdminPasswordConfirm', 'label' => 'config-admin-password-confirm' ) ) . $this->parent->getTextBox( array( @@ -730,7 +730,7 @@ public function submit() { $retVal = true; $this->parent->setVarsFromRequest( array( 'wgSitename', '_NamespaceType', - '_AdminName', '_AdminPassword', '_AdminPassword2', '_AdminEmail', + '_AdminName', '_AdminPassword', '_AdminPasswordConfirm', '_AdminEmail', '_Subscribe', '_SkipOptional', 'wgMetaNamespace' ) ); // Validate site name @@ -808,7 +808,7 @@ # $user->getPasswordValidity just checks for $wgMinimalPasswordLength. # This message is more specific and helpful. $msg = 'config-admin-password-blank'; - } elseif ( $pwd !== $this->getVar( '_AdminPassword2' ) ) { + } elseif ( $pwd !== $this->getVar( '_AdminPasswordConfirm' ) ) { $msg = 'config-admin-password-mismatch'; } elseif ( $valid !== true ) { # As of writing this will only catch the username being e.g. 'FOO' and @@ -818,7 +818,7 @@ if ( $msg !== false ) { call_user_func_array( array( $this->parent, 'showError' ), (array)$msg ); $this->setVar( '_AdminPassword', '' ); - $this->setVar( '_AdminPassword2', '' ); + $this->setVar( '_AdminPasswordConfirm', '' ); $retVal = false; } diff --git a/tests/selenium/installer/MediaWikiErrorsNamepageTestCase.php b/tests/selenium/installer/MediaWikiErrorsNamepageTestCase.php index 3b2f012..77d73fa 100644 --- a/tests/selenium/installer/MediaWikiErrorsNamepageTestCase.php +++ b/tests/selenium/installer/MediaWikiErrorsNamepageTestCase.php @@ -54,7 +54,7 @@ // Verify warning message for the blank 'Site name' $this->type( "config__AdminName", VALID_YOUR_NAME ); $this->type( "config__AdminPassword", VALID_PASSWORD ); - $this->type( "config__AdminPassword2", VALID_PASSWORD_AGAIN ); + $this->type( "config__AdminPasswordConfirm", VALID_PASSWORD_AGAIN ); parent::clickContinueButton(); $this->assertEquals( "Enter a site name.", $this->getText( LINK_DIV . "div[2]/div[2]" ) ); @@ -103,7 +103,7 @@ // Verify warning message for the blank 'Password again' $this->type( "config_wgSitename", VALID_WIKI_NAME ); $this->type( "config__AdminPassword", VALID_PASSWORD ); - $this->type( "config__AdminPassword2", " " ); + $this->type( "config__AdminPasswordConfirm", " " ); parent::clickContinueButton(); $this->assertEquals( "The two passwords you entered do not match.", $this->getText( LINK_DIV . "div[2]/div[2]" ) ); @@ -111,7 +111,7 @@ // Verify warning message for the different'Password' and 'Password again' $this->type( "config_wgSitename", VALID_WIKI_NAME ); $this->type( "config__AdminPassword", VALID_PASSWORD ); - $this->type( "config__AdminPassword2", INVALID_PASSWORD_AGAIN ); + $this->type( "config__AdminPasswordConfirm", INVALID_PASSWORD_AGAIN ); parent::clickContinueButton(); $this->assertEquals( "The two passwords you entered do not match.", $this->getText( LINK_DIV . "div[2]/div[2]" ) ); diff --git a/tests/selenium/installer/MediaWikiInstallationCommonFunction.php b/tests/selenium/installer/MediaWikiInstallationCommonFunction.php index 472d2ed..20e275a 100644 --- a/tests/selenium/installer/MediaWikiInstallationCommonFunction.php +++ b/tests/selenium/installer/MediaWikiInstallationCommonFunction.php @@ -125,7 +125,7 @@ $this->type( "config_wgSitename", NAME_OF_WIKI ); $this->type( "config__AdminName", ADMIN_USER_NAME ); $this->type( "config__AdminPassword", ADMIN_PASSWORD ); - $this->type( "config__AdminPassword2", ADMIN_RETYPE_PASSWORD ); + $this->type( "config__AdminPasswordConfirm", ADMIN_RETYPE_PASSWORD ); $this->type( "config__AdminEmail", ADMIN_EMAIL_ADDRESS ); $this->click( "submit-continue" ); @@ -156,7 +156,7 @@ $this->type( "config_wgSitename", NAME_OF_WIKI ); $this->type( "config__AdminName", ADMIN_USER_NAME ); $this->type( "config__AdminPassword", ADMIN_PASSWORD ); - $this->type( "config__AdminPassword2", ADMIN_RETYPE_PASSWORD ); + $this->type( "config__AdminPasswordConfirm", ADMIN_RETYPE_PASSWORD ); $this->type( "config__AdminEmail", ADMIN_EMAIL_ADDRESS ); $this->click( "submit-continue" ); @@ -191,7 +191,7 @@ $this->type( "config_wgSitename", NAME_OF_WIKI ); $this->type( "config__AdminName", ADMIN_USER_NAME ); $this->type( "config__AdminPassword", ADMIN_PASSWORD ); - $this->type( "config__AdminPassword2", ADMIN_RETYPE_PASSWORD ); + $this->type( "config__AdminPasswordConfirm", ADMIN_RETYPE_PASSWORD ); $this->type( "config__AdminEmail", ADMIN_EMAIL_ADDRESS ); $this->click( "submit-continue" ); @@ -212,7 +212,7 @@ $this->type( "config_wgSitename", NAME_OF_WIKI ); $this->type( "config__AdminName", ADMIN_USER_NAME ); $this->type( "config__AdminPassword", ADMIN_PASSWORD ); - $this->type( "config__AdminPassword2", ADMIN_RETYPE_PASSWORD ); + $this->type( "config__AdminPasswordConfirm", ADMIN_RETYPE_PASSWORD ); $this->type( "config__AdminEmail", ADMIN_EMAIL_ADDRESS ); $this->click( "submit-continue" ); $this->waitForPageToLoad( PAGE_LOAD_TIME ); diff --git a/tests/selenium/installer/MediaWikiUserInterfaceTestCase.php b/tests/selenium/installer/MediaWikiUserInterfaceTestCase.php index 71ef684..d04090a 100644 --- a/tests/selenium/installer/MediaWikiUserInterfaceTestCase.php +++ b/tests/selenium/installer/MediaWikiUserInterfaceTestCase.php @@ -291,7 +291,7 @@ $this->getText( LINK_FORM . "fieldset/div[3]/div[1]/label" ) ); // 'Password again' text box available - $this->assertTrue( $this->isElementPresent( "config__AdminPassword2" ) ); + $this->assertTrue( $this->isElementPresent( "config__AdminPasswordConfirm" ) ); // 'Email address' label avaialble $this->assertEquals( "E-mail address:", -- To view, visit https://gerrit.wikimedia.org/r/65554 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ica04efb07014d0e7c91ae69c1a7ba5e00c0b16c2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Waldir <wal...@email.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits