X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Finstaller%2FMysqlInstaller.php;h=45f932a83b8ebef479a90e8b50fb33cf4b1fcdcf;hb=a3dfd8ee587608f14f25b63f87803999381041b1;hp=c5dd4dcbc9d75483280abeab66d0c12e7314df43;hpb=52ce204415df71eb978b1f6f61a6122f7c3b09f6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/MysqlInstaller.php b/includes/installer/MysqlInstaller.php index c5dd4dcbc9..45f932a83b 100644 --- a/includes/installer/MysqlInstaller.php +++ b/includes/installer/MysqlInstaller.php @@ -40,7 +40,6 @@ class MysqlInstaller extends DatabaseInstaller { 'wgDBpassword', 'wgDBprefix', 'wgDBTableOptions', - 'wgDBmysql5', ]; protected $internalDefaults = [ @@ -51,7 +50,8 @@ class MysqlInstaller extends DatabaseInstaller { public $supportedEngines = [ 'InnoDB', 'MyISAM' ]; - public $minimumVersion = '5.5.8'; + public static $minimumVersion = '5.5.8'; + protected static $notMiniumumVerisonMessage = 'config-mysql-old'; public $webUserPrivs = [ 'DELETE', @@ -72,7 +72,7 @@ class MysqlInstaller extends DatabaseInstaller { * @return bool */ public function isCompiled() { - return self::checkExtension( 'mysql' ) || self::checkExtension( 'mysqli' ); + return self::checkExtension( 'mysqli' ); } /** @@ -133,12 +133,7 @@ class MysqlInstaller extends DatabaseInstaller { $conn = $status->value; // Check version - $version = $conn->getServerVersion(); - if ( version_compare( $version, $this->minimumVersion ) < 0 ) { - return Status::newFatal( 'config-mysql-old', $this->minimumVersion, $version ); - } - - return $status; + return static::meetsMinimumRequirement( $conn->getServerVersion() ); } /** @@ -418,20 +413,6 @@ class MysqlInstaller extends DatabaseInstaller { $this->setVar( '_MysqlCharset', reset( $charsets ) ); } - // Do charset selector - if ( count( $charsets ) >= 2 ) { - // getRadioSet() builds a set of labeled radio buttons. - // For grep: The following messages are used as the item labels: - // config-mysql-binary, config-mysql-utf8 - $s .= $this->getRadioSet( [ - 'var' => '_MysqlCharset', - 'label' => 'config-mysql-charset', - 'itemLabelPrefix' => 'config-mysql-', - 'values' => $charsets - ] ); - $s .= $this->parent->getHelpBox( 'config-mysql-charset-help' ); - } - return $s; } @@ -675,7 +656,6 @@ class MysqlInstaller extends DatabaseInstaller { } public function getLocalSettings() { - $dbmysql5 = wfBoolToStr( $this->getVar( 'wgDBmysql5', true ) ); $prefix = LocalSettingsGenerator::escapePhpString( $this->getVar( 'wgDBprefix' ) ); $tblOpts = LocalSettingsGenerator::escapePhpString( $this->getTableOptions() ); @@ -683,9 +663,6 @@ class MysqlInstaller extends DatabaseInstaller { \$wgDBprefix = \"{$prefix}\"; # MySQL table options to use during installation or update -\$wgDBTableOptions = \"{$tblOpts}\"; - -# Experimental charset support for MySQL 5.0. -\$wgDBmysql5 = {$dbmysql5};"; +\$wgDBTableOptions = \"{$tblOpts}\";"; } }