Make Pg installer work in the “common” case: follow up r89821 so that $exists can...
authorMark A. Hershberger <mah@users.mediawiki.org>
Fri, 10 Jun 2011 18:48:16 +0000 (18:48 +0000)
committerMark A. Hershberger <mah@users.mediawiki.org>
Fri, 10 Jun 2011 18:48:16 +0000 (18:48 +0000)
includes/installer/PostgresInstaller.php

index 501f673..a47c172 100644 (file)
@@ -276,15 +276,13 @@ class PostgresInstaller extends DatabaseInstaller {
 
                $same = $this->getVar( 'wgDBuser' ) === $this->getVar( '_InstallUser' );
 
-               if ( !$same ) {
-                       // Check if the web user exists
-                       // Connect to the database with the install user
-                       $status = $this->getPgConnection( 'create-db' );
-                       if ( !$status->isOK() ) {
-                               return $status;
-                       }
-                       $exists = $status->value->roleExists( $this->getVar( 'wgDBuser' ) );
+               // Check if the web user exists
+               // Connect to the database with the install user
+               $status = $this->getPgConnection( 'create-db' );
+               if ( !$status->isOK() ) {
+                       return $status;
                }
+               $exists = $status->value->roleExists( $this->getVar( 'wgDBuser' ) );
 
                // Validate the create checkbox
                if ( $this->canCreateAccounts() && !$same && !$exists ) {