Index: trunk/phase3/maintenance/install.php |
— | — | @@ -50,12 +50,8 @@ |
51 | 51 | $this->addOption( 'dbpass', 'The pasword for the DB user for normal operations', false, true ); |
52 | 52 | $this->addOption( 'confpath', "Path to write LocalSettings.php to, default $IP", false, true ); |
53 | 53 | /* $this->addOption( 'dbschema', 'The schema for the MediaWiki DB in pg (mediawiki)', false, true ); */ |
54 | | - /* $this->addOption( 'dbtsearch2schema', 'The schema for the tsearch2 DB in pg (public)', false, true ); */ |
55 | 54 | /* $this->addOption( 'namespace', 'The project namespace (same as the name)', false, true ); */ |
56 | 55 | $this->addOption( 'env-checks', "Run environment checks only, don't change anything" ); |
57 | | - $this->addOption( 'upgrade', |
58 | | - 'Allow the upgrade to continue despite an existing LocalSettings.php', false, true ); |
59 | | - |
60 | 56 | } |
61 | 57 | |
62 | 58 | public function execute() { |
— | — | @@ -76,6 +72,13 @@ |
77 | 73 | return; |
78 | 74 | } |
79 | 75 | } else { |
| 76 | + $status = $installer->doEnvironmentChecks(); |
| 77 | + if( $status->isGood() ) { |
| 78 | + $installer->showMessage( 'config-env-good' ); |
| 79 | + } else { |
| 80 | + $installer->showStatusMessage( $status ); |
| 81 | + return; |
| 82 | + } |
80 | 83 | $installer->execute(); |
81 | 84 | $installer->writeConfigurationFile( $this->getOption( 'confpath', $IP ) ); |
82 | 85 | } |
Index: trunk/phase3/includes/installer/Installer.i18n.php |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | To upgrade this installation, please enter the value of <code>\$wgUpgradeKey</code> in the box below. |
21 | 21 | You will find it in LocalSettings.php.", |
22 | 22 | 'config-localsettings-cli-upgrade' => 'A LocalSettings.php file has been detected. |
23 | | -To upgrade this installation, please give the --upgrade=yes option.', |
| 23 | +To upgrade this installation, please run update.php instead', |
24 | 24 | 'config-localsettings-key' => 'Upgrade key:', |
25 | 25 | 'config-localsettings-badkey' => 'The key you provided is incorrect.', |
26 | 26 | 'config-upgrade-key-missing' => 'An existing installation of MediaWiki has been detected. |
Index: trunk/phase3/includes/installer/CliInstaller.php |
— | — | @@ -31,9 +31,6 @@ |
32 | 32 | 'dbschema' => 'wgDBmwschema', |
33 | 33 | 'dbpath' => 'wgSQLiteDataDir', |
34 | 34 | 'scriptpath' => 'wgScriptPath', |
35 | | - 'upgrade' => 'cliUpgrade', /* As long as it isn't $confItems |
36 | | - * in LocalSettingsGenerator, we |
37 | | - * should be fine. */ |
38 | 35 | ); |
39 | 36 | |
40 | 37 | /** |
— | — | @@ -91,10 +88,8 @@ |
92 | 89 | * Main entry point. |
93 | 90 | */ |
94 | 91 | public function execute() { |
95 | | - global $cliUpgrade; |
96 | | - |
97 | 92 | $vars = $this->getExistingLocalSettings(); |
98 | | - if( $vars && ( !isset( $cliUpgrade ) || $cliUpgrade !== "yes" ) ) { |
| 93 | + if( $vars ) { |
99 | 94 | $this->showStatusMessage( |
100 | 95 | Status::newFatal( "config-localsettings-cli-upgrade" ) |
101 | 96 | ); |