* @see wfWaitForSlaves()
*/
-define( 'MW_CONFIG_CALLBACK', 'CoreInstaller::overrideConfig' );
+define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' );
require_once( dirname( dirname( __FILE__ ) )."/maintenance/Maintenance.php" );
/* $this->addOption( 'dbtsearch2schema', 'The schema for the tsearch2 DB in pg (public)', false, true ); */
/* $this->addOption( 'namespace', 'The project namespace (same as the name)', false, true ); */
$this->addOption( 'env-checks', "Run environment checks only, don't change anything" );
+ $this->addOption( 'upgrade',
+ 'Allow the upgrade to continue despite an existing LocalSettings.php', false, true );
+
}
public function execute() {
new CliInstaller( $siteName, $adminName, $this->mOptions );
if ( $this->hasOption( 'env-checks' ) ) {
- $installer->doEnvironmentChecks();
+ $status = $installer->doEnvironmentChecks();
+ if( $status->isGood() ) {
+ $installer->showMessage( 'config-env-good' );
+ } else {
+ $installer->showStatusMessage( $status );
+ return;
+ }
} else {
$installer->execute();
$installer->writeConfigurationFile( $this->getOption( 'confpath', $IP ) );
$maintClass = "CommandLineInstaller";
-require_once( DO_MAINTENANCE );
+require_once( RUN_MAINTENANCE_IF_MAIN );