X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Finstall.php;h=0037ea80c220a448717b14f0a490fd660d7df5ce;hb=1fb06c0c71282807b0ccecd1d71fb16244846955;hp=9a73f2e014b0fb052b5ff251b0c3652fc03f69a9;hpb=1a8daf2c07e31337d83ee39b42873373023c8d40;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/install.php b/maintenance/install.php index 9a73f2e014..0037ea80c2 100644 --- a/maintenance/install.php +++ b/maintenance/install.php @@ -21,16 +21,13 @@ * @ingroup Maintenance */ -if ( !function_exists( 'version_compare' ) || ( version_compare( PHP_VERSION, '5.3.2' ) < 0 ) ) { - require_once dirname( __FILE__ ) . '/../includes/PHPVersionError.php'; - wfPHPVersionError( 'cli' ); -} +// Checking for old versions of PHP is done in Maintenance.php +// We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+ +require_once dirname( __FILE__ ) . '/Maintenance.php'; define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' ); define( 'MEDIAWIKI_INSTALL', true ); -require_once dirname( __DIR__ ) . '/maintenance/Maintenance.php'; - /** * Maintenance script to install and configure MediaWiki * @@ -107,9 +104,9 @@ class CommandLineInstaller extends Maintenance { $this->error( 'WARNING: You have provided the options "dbpass" and "dbpassfile". ' . 'The content of "dbpassfile" overrides "dbpass".' ); } - wfSuppressWarnings(); + MediaWiki\suppressWarnings(); $dbpass = file_get_contents( $dbpassfile ); // returns false on failure - wfRestoreWarnings(); + MediaWiki\restoreWarnings(); if ( $dbpass === false ) { $this->error( "Couldn't open $dbpassfile", true ); } @@ -122,9 +119,9 @@ class CommandLineInstaller extends Maintenance { $this->error( 'WARNING: You have provided the options "pass" and "passfile". ' . 'The content of "passfile" overrides "pass".' ); } - wfSuppressWarnings(); + MediaWiki\suppressWarnings(); $pass = file_get_contents( $passfile ); // returns false on failure - wfRestoreWarnings(); + MediaWiki\restoreWarnings(); if ( $pass === false ) { $this->error( "Couldn't open $passfile", true ); }