Merge ".pipeline/config.yaml: rename dev stage to publish"
[lhc/web/wiklou.git] / includes / installer / MysqlInstaller.php
index 3013db7..383f8d8 100644 (file)
@@ -48,7 +48,7 @@ class MysqlInstaller extends DatabaseInstaller {
                '_InstallUser' => 'root',
        ];
 
-       public $supportedEngines = [ 'InnoDB', 'MyISAM' ];
+       public $supportedEngines = [ 'InnoDB' ];
 
        public static $minimumVersion = '5.5.8';
        protected static $notMinimumVersionMessage = 'config-mysql-old';
@@ -131,6 +131,7 @@ class MysqlInstaller extends DatabaseInstaller {
                 * @var Database $conn
                 */
                $conn = $status->value;
+               '@phan-var Database $conn';
 
                // Check version
                return static::meetsMinimumRequirement( $conn->getServerVersion() );
@@ -142,6 +143,7 @@ class MysqlInstaller extends DatabaseInstaller {
        public function openConnection() {
                $status = Status::newGood();
                try {
+                       /** @var DatabaseMysqlBase $db */
                        $db = Database::factory( 'mysql', [
                                'host' => $this->getVar( 'wgDBserver' ),
                                'user' => $this->getVar( '_InstallUser' ),
@@ -162,7 +164,7 @@ class MysqlInstaller extends DatabaseInstaller {
 
                $status = $this->getConnection();
                if ( !$status->isOK() ) {
-                       $this->parent->showStatusError( $status );
+                       $this->parent->showStatusMessage( $status );
 
                        return;
                }
@@ -364,45 +366,6 @@ class MysqlInstaller extends DatabaseInstaller {
                        $this->setVar( '_MysqlEngine', reset( $engines ) );
                }
 
-               $s .= Xml::openElement( 'div', [
-                       'id' => 'dbMyisamWarning'
-               ] );
-               $myisamWarning = 'config-mysql-myisam-dep';
-               if ( count( $engines ) === 1 ) {
-                       $myisamWarning = 'config-mysql-only-myisam-dep';
-               }
-               $s .= $this->parent->getWarningBox( wfMessage( $myisamWarning )->text() );
-               $s .= Xml::closeElement( 'div' );
-
-               if ( $this->getVar( '_MysqlEngine' ) != 'MyISAM' ) {
-                       $s .= Xml::openElement( 'script' );
-                       $s .= '$(\'#dbMyisamWarning\').hide();';
-                       $s .= Xml::closeElement( 'script' );
-               }
-
-               if ( count( $engines ) >= 2 ) {
-                       // getRadioSet() builds a set of labeled radio buttons.
-                       // For grep: The following messages are used as the item labels:
-                       // config-mysql-innodb, config-mysql-myisam
-                       $s .= $this->getRadioSet( [
-                               'var' => '_MysqlEngine',
-                               'label' => 'config-mysql-engine',
-                               'itemLabelPrefix' => 'config-mysql-',
-                               'values' => $engines,
-                               'itemAttribs' => [
-                                       'MyISAM' => [
-                                               'class' => 'showHideRadio',
-                                               'rel' => 'dbMyisamWarning'
-                                       ],
-                                       'InnoDB' => [
-                                               'class' => 'hideShowRadio',
-                                               'rel' => 'dbMyisamWarning'
-                                       ]
-                               ]
-                       ] );
-                       $s .= $this->parent->getHelpBox( 'config-mysql-engine-help' );
-               }
-
                // If the current default charset is not supported, use a charset that is
                $charsets = $this->getCharsets();
                if ( !in_array( $this->getVar( '_MysqlCharset' ), $charsets ) ) {