r63649 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63648‎ | r63649 | r63650 >
Date:20:42, 12 March 2010
Author:demon
Status:ok
Tags:
Comment:
Fix install page so it gets next/back buttons, add more useful complete page than "Mockup"
Modified paths:
  • /branches/new-installer/phase3/includes/installer/Installer.php (modified) (history)
  • /branches/new-installer/phase3/includes/installer/WebInstaller.php (modified) (history)
  • /branches/new-installer/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /branches/new-installer/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: branches/new-installer/phase3/maintenance/language/messages.inc
@@ -3354,6 +3354,9 @@
33553355 'config-insecure-secretkey',
33563356 'config-install-user',
33573357 'config-install-localsettings',
 3358+ 'config-install-done',
 3359+ 'config-install-failed',
 3360+ 'config-upgrade-done',
33583361 ),
33593362 );
33603363
Index: branches/new-installer/phase3/includes/installer/WebInstaller.php
@@ -1461,6 +1461,10 @@
14621462 class WebInstaller_Install extends WebInstallerPage {
14631463
14641464 function execute() {
 1465+ if( $this->parent->request->wasPosted() ) {
 1466+ return 'continue';
 1467+ }
 1468+ $this->startForm();
14651469 $this->parent->output->addHTML("<ul>");
14661470
14671471 // Extensions
@@ -1526,6 +1530,10 @@
15271531 $localSettings = new LocalSettings( $this->parent );
15281532 $localSettings->writeLocalSettings();
15291533 $this->endStage();
 1534+
 1535+ $this->parent->setVar( '_InstallStatus', 'installed' );
 1536+
 1537+ $this->endForm();
15301538 }
15311539
15321540 private function startStage( $msg ) {
@@ -1537,6 +1545,21 @@
15381546 }
15391547 }
15401548 class WebInstaller_Complete extends WebInstallerPage {
 1549+ public function execute() {
 1550+ $status = $this->parent->getVar( '_InstallStatus' );
 1551+ $this->startForm();
 1552+ if( $status === 'installed' ) {
 1553+ $msg = 'config-install-done';
 1554+ } elseif( $status === 'upgraded' ) {
 1555+ $msg = 'config-upgrade-done';
 1556+ } else {
 1557+ $msg = 'config-install-failed';
 1558+ }
 1559+ global $wgServer;
 1560+ $url = $wgServer . preg_replace( "/config\/[a-z\-]+\.php5?/i", '', $this->parent->getUrl() );
 1561+ $this->parent->output->addWikiText( wfMsg( $msg, $url ) );
 1562+ $this->endForm( false );
 1563+ }
15411564 }
15421565 class WebInstaller_Restart extends WebInstallerPage {
15431566 function execute() {
Index: branches/new-installer/phase3/includes/installer/Installer.php
@@ -70,6 +70,7 @@
7171 '_CCDone' => false,
7272 '_Extensions' => array(),
7373 '_MemCachedServers' => '',
 74+ '_InstallStatus' => false,
7475 );
7576
7677 /**
Index: branches/new-installer/phase3/languages/messages/MessagesEn.php
@@ -4456,7 +4456,20 @@
44574457 'config-insecure-secretkey' => 'Warning: Unable to create secure $wgSecretKey. Consider changing it manually.',
44584458 'config-install-user' => 'Creating administrator user account',
44594459 'config-install-localsettings' => 'Writing LocalSettings.php',
 4460+'config-install-done' => "'''Congratulations''', you have successfully installed MediaWiki.
44604461
 4462+You will need to move it from <tt>./config/LocalSettings.php</tt> to <tt>./LocalSettings.php</tt> in order
 4463+for MediaWiki to begin working.
 4464+
 4465+[$1 Link to your wiki]",
 4466+'config-install-failed' => "'''Sorry''', something in the installation process seems to have gone horribly wrong.",
 4467+'config-upgrade-done' => "'''Congratulations''', you have successfully upgraded MediaWiki.
 4468+
 4469+If you chose to overwrite your LocalSettings.php file, you will need to move it from <tt>./config/LocalSettings.php</tt>
 4470+to <tt>./LocalSettings.php</tt>.
 4471+
 4472+[$1 Link to your wiki]",
 4473+
44614474 # Special:Version
44624475 'version' => 'Version',
44634476 'version-extensions' => 'Installed extensions',

Status & tagging log