Fixed behavior of Title::invalidateCache.
[lhc/web/wiklou.git] / includes / installer / MysqlInstaller.php
index d550909..e0bf3d7 100644 (file)
@@ -152,7 +152,6 @@ class MysqlInstaller extends DatabaseInstaller {
                                $this->getVar( '_InstallUser' ),
                                $this->getVar( '_InstallPassword' ),
                                false,
-                               false,
                                0,
                                $this->getVar( 'wgDBprefix' )
                        );
@@ -350,7 +349,11 @@ class MysqlInstaller extends DatabaseInstaller {
                $s .= Xml::openElement( 'div', array(
                        'id' => 'dbMyisamWarning'
                ));
-               $s .= $this->parent->getWarningBox( wfMessage( 'config-mysql-myisam-dep' )->text() );
+               $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' ) {
@@ -431,7 +434,6 @@ class MysqlInstaller extends DatabaseInstaller {
                                        $this->getVar( 'wgDBuser' ),
                                        $this->getVar( 'wgDBpassword' ),
                                        false,
-                                       false,
                                        0,
                                        $this->getVar( 'wgDBprefix' )
                                );
@@ -508,7 +510,6 @@ class MysqlInstaller extends DatabaseInstaller {
                                        $dbUser,
                                        $password,
                                        false,
-                                       false,
                                        0,
                                        $this->getVar( 'wgDBprefix' )
                                );
@@ -536,12 +537,12 @@ class MysqlInstaller extends DatabaseInstaller {
                        foreach ( $createHostList as $host ) {
                                $fullName = $this->buildFullUserName( $dbUser, $host );
                                if ( !$this->userDefinitelyExists( $dbUser, $host ) ) {
-                                       try{
+                                       try {
                                                $this->db->begin( __METHOD__ );
                                                $this->db->query( "CREATE USER $fullName IDENTIFIED BY $escPass", __METHOD__ );
                                                $this->db->commit( __METHOD__ );
                                                $grantableNames[] = $fullName;
-                                       } catch( DBQueryError $dqe ) {
+                                       } catch ( DBQueryError $dqe ) {
                                                if ( $this->db->lastErrno() == 1396 /* ER_CANNOT_USER */ ) {
                                                        // User (probably) already exists
                                                        $this->db->rollback( __METHOD__ );
@@ -570,7 +571,7 @@ class MysqlInstaller extends DatabaseInstaller {
                                $this->db->begin( __METHOD__ );
                                $this->db->query( "GRANT ALL PRIVILEGES ON $dbAllTables TO $name", __METHOD__ );
                                $this->db->commit( __METHOD__ );
-                       } catch( DBQueryError $dqe ) {
+                       } catch ( DBQueryError $dqe ) {
                                $this->db->rollback( __METHOD__ );
                                $status->fatal( 'config-install-user-grant-failed', $dbUser, $dqe->getText() );
                        }
@@ -601,7 +602,7 @@ class MysqlInstaller extends DatabaseInstaller {
                        $res = $this->db->selectRow( 'mysql.user', array( 'Host', 'User' ),
                                array( 'Host' => $host, 'User' => $user ), __METHOD__ );
                        return (bool)$res;
-               } catch( DBQueryError $dqe ) {
+               } catch ( DBQueryError $dqe ) {
                        return false;
                }