Index: trunk/phase3/includes/installer/Installer.i18n.php |
— | — | @@ -438,6 +438,8 @@ |
439 | 439 | They may require additional configuration, but you can enable them now', |
440 | 440 | 'config-install-alreadydone' => "'''Warning:''' You seem to have already installed MediaWiki and are trying to install it again. |
441 | 441 | Please proceed to the next page.", |
| 442 | + 'config-install-begin' => 'By pressing next, you will begin the installation of MediaWiki. |
| 443 | +If you still want to make changes, press back.', |
442 | 444 | 'config-install-step-done' => 'done', |
443 | 445 | 'config-install-step-failed' => 'failed', |
444 | 446 | 'config-install-extensions' => 'Including extensions', |
Index: trunk/phase3/includes/installer/WebInstallerPage.php |
— | — | @@ -1009,25 +1009,29 @@ |
1010 | 1010 | class WebInstaller_Install extends WebInstallerPage { |
1011 | 1011 | |
1012 | 1012 | public function execute() { |
1013 | | - if( $this->parent->request->wasPosted() ) { |
| 1013 | + if( $this->getVar( '_UpgradeDone' ) ) { |
| 1014 | + return 'skip'; |
| 1015 | + } elseif( $this->getVar( '_InstallDone' ) ) { |
1014 | 1016 | return 'continue'; |
1015 | | - } elseif( $this->getVar( '_InstallDone' ) ) { |
| 1017 | + } elseif( $this->parent->request->wasPosted() ) { |
1016 | 1018 | $this->startForm(); |
1017 | | - $status = new Status(); |
1018 | | - $status->warning( 'config-install-alreadydone' ); |
1019 | | - $this->parent->showStatusBox( $status ); |
1020 | | - } elseif( $this->getVar( '_UpgradeDone' ) ) { |
1021 | | - return 'skip'; |
1022 | | - } else { |
1023 | | - $this->startForm(); |
1024 | 1019 | $this->addHTML("<ul>"); |
1025 | | - $this->parent->performInstallation( |
| 1020 | + $results = $this->parent->performInstallation( |
1026 | 1021 | array( $this, 'startStage'), |
1027 | 1022 | array( $this, 'endStage' ) |
1028 | 1023 | ); |
1029 | 1024 | $this->addHTML("</ul>"); |
| 1025 | + // PerformInstallation bails on a fatal, so make sure the last item |
| 1026 | + // completed before giving 'next.' Likewise, only provide back on failure |
| 1027 | + $lastStep = end( $results ); |
| 1028 | + $continue = $lastStep->isOK() ? 'continue' : false; |
| 1029 | + $back = $lastStep->isOK() ? false : 'back'; |
| 1030 | + $this->endForm( $continue, $back ); |
| 1031 | + } else { |
| 1032 | + $this->startForm(); |
| 1033 | + $this->addHTML( $this->parent->getInfoBox( wfMsgNoTrans( 'config-install-begin' ) ) ); |
| 1034 | + $this->endForm(); |
1030 | 1035 | } |
1031 | | - $this->endForm(); |
1032 | 1036 | return true; |
1033 | 1037 | } |
1034 | 1038 | |