When switching from admin to non-admin account, make sure to set $this->db to null...
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Mon, 21 Mar 2011 22:09:49 +0000 (22:09 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Mon, 21 Mar 2011 22:09:49 +0000 (22:09 +0000)
includes/installer/PostgresInstaller.php

index 0b140a5..c237a11 100644 (file)
@@ -231,11 +231,14 @@ class PostgresInstaller extends DatabaseInstaller {
                        $conn->query( "ALTER DATABASE $safedb OWNER TO $safeuser", __METHOD__ );
                }
                
+               // Now that we've established the real database exists, connect to it
+               // Because we do not want the same connection, forcibly expire the existing conn
+               $this->db = null;
                $this->useAdmin = false;
-                       $status = $this->getConnection();
-                       if ( !$status->isOK() ) {
-                               return $status;
-                       }
+               $status = $this->getConnection();
+               if ( !$status->isOK() ) {
+                       return $status;
+               }
                $conn = $status->value;
 
                if( !$conn->schemaExists( $schema ) ) {