X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Finstall.php;h=a71bb74a5ccdb5368ff7e5ab7e90f92a3bc52eb2;hb=6c07a09f462147b35e8c76701b5dc6b6140310c8;hp=3395458d9fe3f4a8e9353c299b08ef5c8e1d3359;hpb=f35af6b719bd4b5c1119d5926daf69e8304e37d9;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/install.php b/maintenance/install.php index 3395458d9f..a71bb74a5c 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()->parse() . "\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() {