X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Finstall.php;h=28a1746d9ec37d69d0004a4cef5bd9b60d098058;hb=02f35caa16fa574bb36a1d22eea62c3b250de235;hp=3395458d9fe3f4a8e9353c299b08ef5c8e1d3359;hpb=0756849eb8450909d14dcb619307bdf07f0c7fcd;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/install.php b/maintenance/install.php index 3395458d9f..28a1746d9e 100644 --- a/maintenance/install.php +++ b/maintenance/install.php @@ -115,7 +115,12 @@ class CommandLineInstaller extends Maintenance { $this->setPassOption(); } - $installer = InstallerOverrides::getCliInstaller( $siteName, $adminName, $this->mOptions ); + try { + $installer = InstallerOverrides::getCliInstaller( $siteName, $adminName, $this->mOptions ); + } catch ( \MediaWiki\Installer\InstallException $e ) { + $this->output( $e->getStatus()->getMessage()->text() . "\n" ); + return false; + } $status = $installer->doEnvironmentChecks(); if ( $status->isGood() ) { @@ -123,12 +128,21 @@ class CommandLineInstaller extends Maintenance { } else { $installer->showStatusMessage( $status ); - return; + return false; } if ( !$envChecksOnly ) { - $installer->execute(); + $status = $installer->execute(); + if ( !$status->isGood() ) { + return false; + } $installer->writeConfigurationFile( $this->getOption( 'confpath', $IP ) ); + $installer->showMessage( + 'config-install-success', + $installer->getVar( 'wgServer' ), + $installer->getVar( 'wgScriptPath' ) + ); } + return true; } private function setDbPassOption() {