Fix for r87278: if we're installing with the same user we're going to use, skip creat...
authorChad Horohoe <demon@users.mediawiki.org>
Thu, 5 May 2011 21:28:26 +0000 (21:28 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Thu, 5 May 2011 21:28:26 +0000 (21:28 +0000)
includes/installer/MysqlInstaller.php

index 467f0e7..5046df3 100644 (file)
@@ -419,6 +419,10 @@ class MysqlInstaller extends DatabaseInstaller {
        }
 
        public function setupUser() {
+               $dbUser = $this->getVar( 'wgDBuser' );
+               if( $dbUser == $this->getVar( '_InstallUser' ) ) {
+                       return Status::newGood();
+               }
                $status = $this->getConnection();
                if ( !$status->isOK() ) {
                        return $status;
@@ -428,7 +432,6 @@ class MysqlInstaller extends DatabaseInstaller {
                $dbName = $this->getVar( 'wgDBname' );
                $this->db->selectDB( $dbName );
                $server = $this->getVar( 'wgDBserver' );
-               $dbUser = $this->getVar( 'wgDBuser' );
                $password = $this->getVar( 'wgDBpassword' );
                $grantableNames = array();