From: OverlordQ Date: Fri, 5 Feb 2010 05:40:50 +0000 (+0000) Subject: Force new connection to database, fixes bug 20475, might have unforseen consequences X-Git-Tag: 1.31.0-rc.0~37919 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=commitdiff_plain;h=76e2c017c4137e3b8e46a64d1d9f1700f4a0f3ff;p=lhc%2Fweb%2Fwiklou.git Force new connection to database, fixes bug 20475, might have unforseen consequences --- 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 );