Fixed some spacing in maintenance folder
[lhc/web/wiklou.git] / maintenance / install.php
index 39e613f..56f9259 100644 (file)
  */
 
 if ( !function_exists( 'version_compare' ) || ( version_compare( phpversion(), '5.3.2' ) < 0 ) ) {
-       echo "You are using PHP version " . phpversion() . " but MediaWiki needs PHP 5.3.2 or higher. ABORTING.\n" .
-       "Check if you have a newer php executable with a different name, such as php5.\n";
-       die( 1 );
+       require_once( dirname( __FILE__ ) . '/../includes/PHPVersionError.php' );
+       wfPHPVersionError( 'cli' );
 }
 
 define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' );
 define( 'MEDIAWIKI_INSTALL', true );
 
-require_once( dirname( __DIR__ )."/maintenance/Maintenance.php" );
+require_once( dirname( __DIR__ ) . "/maintenance/Maintenance.php" );
 
 /**
  * Maintenance script to install and configure MediaWiki
@@ -110,13 +109,13 @@ class CommandLineInstaller extends Maintenance {
                        InstallerOverrides::getCliInstaller( $siteName, $adminName, $this->mOptions );
 
                $status = $installer->doEnvironmentChecks();
-               if( $status->isGood() ) {
+               if ( $status->isGood() ) {
                        $installer->showMessage( 'config-env-good' );
                } else {
                        $installer->showStatusMessage( $status );
                        return;
                }
-               if( !$this->hasOption( 'env-checks' ) ) {
+               if ( !$this->hasOption( 'env-checks' ) ) {
                        $installer->execute();
                        $installer->writeConfigurationFile( $this->getOption( 'confpath', $IP ) );
                }