From: Jeff Janes Date: Tue, 24 Feb 2015 03:51:29 +0000 (-0800) Subject: PostreSQL: DatabaseBase constructor cleanups X-Git-Tag: 1.31.0-rc.0~12273^2 X-Git-Url: https://git.cyclocoop.org/%20%27.%28%24debut%20%20%20%24par_page%29.%27?a=commitdiff_plain;h=1fd9f18d13aed38847e220989f059da701ff4d24;p=lhc%2Fweb%2Fwiklou.git PostreSQL: DatabaseBase constructor cleanups Change I29b79a3c1bb2b5e51c1c8f5e04cd08c71e0662a3 rendered it uninstallable on PostgreSQL. Make the corresponding API changes to PostgreSQL installer. Bug: T90288 Change-Id: I2019893ad705d99f3dbbce13690cd808cfb71d4a --- diff --git a/includes/installer/PostgresInstaller.php b/includes/installer/PostgresInstaller.php index e19f9aafc3..b18fe94487 100644 --- a/includes/installer/PostgresInstaller.php +++ b/includes/installer/PostgresInstaller.php @@ -262,11 +262,13 @@ class PostgresInstaller extends DatabaseInstaller { $status = Status::newGood(); foreach ( $dbs as $db ) { try { - $conn = new DatabasePostgres( - $this->getVar( 'wgDBserver' ), - $user, - $password, - $db ); + $p = array( + 'host' => $this->getVar( 'wgDBserver' ), + 'user' => $user, + 'password' => $password, + 'dbname' => $db + ); + $conn = DatabaseBase::factory( 'postgres', $p ); } catch ( DBConnectionError $error ) { $conn = false; $status->fatal( 'config-pg-test-error', $db,