From 1fd9f18d13aed38847e220989f059da701ff4d24 Mon Sep 17 00:00:00 2001 From: Jeff Janes Date: Mon, 23 Feb 2015 19:51:29 -0800 Subject: [PATCH] PostreSQL: DatabaseBase constructor cleanups Change I29b79a3c1bb2b5e51c1c8f5e04cd08c71e0662a3 rendered it uninstallable on PostgreSQL. Make the corresponding API changes to PostgreSQL installer. Bug: T90288 Change-Id: I2019893ad705d99f3dbbce13690cd808cfb71d4a --- includes/installer/PostgresInstaller.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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, -- 2.20.1