r75413 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75412‎ | r75413 | r75414 >
Date:11:45, 26 October 2010
Author:demon
Status:ok
Tags:
Comment:
Followup r75392: reduce some duplication, eliminate bool param
Modified paths:
  • /trunk/phase3/includes/installer/WebInstallerPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/WebInstallerPage.php
@@ -119,7 +119,8 @@
120120 } else {
121121 $key = $r->getText( 'config_wpUpgradeKey' );
122122 if( !$key || $key !== $this->getVar( '_UpgradeKey' ) ) {
123 - $this->display( true );
 123+ $this->parent->showError( 'config-localsettings-badkey' );
 124+ $this->display();
124125 return 'output';
125126 } else {
126127 $this->setVar( '_LocalSettingsLocked', false );
@@ -130,23 +131,17 @@
131132
132133 /**
133134 * Display stuff to the end user
134 - * @param $badKey bool Whether the key input by the user was bad
135135 */
136 - private function display( $badKey = false ) {
 136+ private function display() {
137137 $this->startForm();
 138+ $this->parent->showStatusBox( $this->status );
138139 if( $this->status->isOK() && !$this->status->isGood() ) {
139 - if( $badKey ) {
140 - $this->parent->showError( 'config-localsettings-badkey' );
141 - }
142 - $this->parent->output->addWikiText( wfMsg( 'config-localsettings-upgrade' ) );
143140 $this->addHTML( "<br />" .
144141 $this->parent->getTextBox( array(
145142 'var' => 'wpUpgradeKey',
146143 'label' => 'config-localsettings-key',
147144 ) )
148145 );
149 - } else {
150 - $this->parent->showStatusBox( $this->status );
151146 }
152147 $this->endForm();
153148 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75392(bug 198: Easy, secure in-place upgrade) Introduce new $wgUpgradeKey. When se...demon23:18, 25 October 2010

Status & tagging log