r62013 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62012‎ | r62013 | r62014 >
Date:05:40, 5 February 2010
Author:overlordq
Status:ok
Tags:
Comment:
Force new connection to database, fixes bug 20475, might have unforseen consequences
Modified paths:
  • /trunk/phase3/includes/db/DatabasePostgres.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabasePostgres.php
@@ -136,8 +136,8 @@
137137
138138 global $wgDBport;
139139
140 - if (!strlen($user)) { ## e.g. the class is being loaded
141 - return;
 140+ if (!strlen($user)) { ## e.g. the class is being loaded
 141+ return;
142142 }
143143 $this->close();
144144 $this->mServer = $server;
@@ -156,7 +156,7 @@
157157 if ($port!=false && $port!="") {
158158 $connectVars['port'] = $port;
159159 }
160 - $connectString = $this->makeConnectionString( $connectVars );
 160+ $connectString = $this->makeConnectionString( $connectVars, PGSQL_CONNECT_FORCE_NEW );
161161
162162 $this->installErrorHandler();
163163 $this->mConn = pg_connect( $connectString );

Status & tagging log