From 76e2c017c4137e3b8e46a64d1d9f1700f4a0f3ff Mon Sep 17 00:00:00 2001 From: OverlordQ Date: Fri, 5 Feb 2010 05:40:50 +0000 Subject: [PATCH] Force new connection to database, fixes bug 20475, might have unforseen consequences --- includes/db/DatabasePostgres.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index 9a834ba002..e76e70ad38 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -136,8 +136,8 @@ class DatabasePostgres extends DatabaseBase { global $wgDBport; - if (!strlen($user)) { ## e.g. the class is being loaded - return; + if (!strlen($user)) { ## e.g. the class is being loaded + return; } $this->close(); $this->mServer = $server; @@ -156,7 +156,7 @@ class DatabasePostgres extends DatabaseBase { if ($port!=false && $port!="") { $connectVars['port'] = $port; } - $connectString = $this->makeConnectionString( $connectVars ); + $connectString = $this->makeConnectionString( $connectVars, PGSQL_CONNECT_FORCE_NEW ); $this->installErrorHandler(); $this->mConn = pg_connect( $connectString ); -- 2.20.1