From 04adfe51ca913a3a25b281dab4f951f242161e61 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Tue, 26 Oct 2010 11:45:21 +0000 Subject: [PATCH] Followup r75392: reduce some duplication, eliminate bool param --- includes/installer/WebInstallerPage.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index 060009500c..7471d7e40e 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -119,7 +119,8 @@ class WebInstaller_Locked extends WebInstallerPage { } else { $key = $r->getText( 'config_wpUpgradeKey' ); if( !$key || $key !== $this->getVar( '_UpgradeKey' ) ) { - $this->display( true ); + $this->parent->showError( 'config-localsettings-badkey' ); + $this->display(); return 'output'; } else { $this->setVar( '_LocalSettingsLocked', false ); @@ -130,23 +131,17 @@ class WebInstaller_Locked extends WebInstallerPage { /** * Display stuff to the end user - * @param $badKey bool Whether the key input by the user was bad */ - private function display( $badKey = false ) { + private function display() { $this->startForm(); + $this->parent->showStatusBox( $this->status ); if( $this->status->isOK() && !$this->status->isGood() ) { - if( $badKey ) { - $this->parent->showError( 'config-localsettings-badkey' ); - } - $this->parent->output->addWikiText( wfMsg( 'config-localsettings-upgrade' ) ); $this->addHTML( "
" . $this->parent->getTextBox( array( 'var' => 'wpUpgradeKey', 'label' => 'config-localsettings-key', ) ) ); - } else { - $this->parent->showStatusBox( $this->status ); } $this->endForm(); } -- 2.20.1