Localisation updates for core and extension messages from translatewiki.net (2011...
[lhc/web/wiklou.git] / maintenance / install.php
index 56e49cf..5504ed3 100644 (file)
@@ -20,7 +20,7 @@
  * @see wfWaitForSlaves()
  */
 
-define( 'MW_CONFIG_CALLBACK', 'CoreInstaller::overrideConfig' );
+define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' );
 
 require_once( dirname( dirname( __FILE__ ) )."/maintenance/Maintenance.php" );
 
@@ -53,6 +53,9 @@ class CommandLineInstaller extends Maintenance {
                /* $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() {
@@ -65,7 +68,13 @@ class CommandLineInstaller extends Maintenance {
                        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 ) );
@@ -81,4 +90,4 @@ class CommandLineInstaller extends Maintenance {
 
 $maintClass = "CommandLineInstaller";
 
-require_once( DO_MAINTENANCE );
+require_once( RUN_MAINTENANCE_IF_MAIN );