From: Greg Sabino Mullane Date: Wed, 14 Mar 2007 16:34:50 +0000 (+0000) Subject: Typo, minor rearrangements, X-Git-Tag: 1.31.0-rc.0~53738 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=2194fa6ed071bdf62e9b7d5577655b6161d4b289;p=lhc%2Fweb%2Fwiklou.git Typo, minor rearrangements, --- diff --git a/includes/DatabasePostgres.php b/includes/DatabasePostgres.php index d945e1d814..3c0a094ae6 100644 --- a/includes/DatabasePostgres.php +++ b/includes/DatabasePostgres.php @@ -61,9 +61,12 @@ class DatabasePostgres extends Database { throw new DBConnectionError( $this, "Postgres functions missing, have you compiled PHP with the --with-pgsql option?\n (Note: if you recently installed PHP, you may need to restart your webserver and database)\n" ); } - global $wgDBport; + if (!strlen($user)) { ## e.g. the class is being loaded + return; + } + $this->close(); $this->mServer = $server; $port = $wgDBport; @@ -79,9 +82,6 @@ class DatabasePostgres extends Database { $hstring .= "port=$port "; } - if (!strlen($user)) { ## e.g. the class is being loaded - return; - } error_reporting( E_ALL ); @$this->mConn = pg_connect("$hstring dbname=$dbName user=$user password=$password"); @@ -230,7 +230,8 @@ class DatabasePostgres extends Database { $wgDBsuperuser = ''; return true; ## Reconnect as regular user - } + + } ## end superuser if (!defined('POSTGRES_SEARCHPATH')) { @@ -788,7 +789,7 @@ class DatabasePostgres extends Database { return $type; } - function begin( $fname = 'DatabasePostgrs::begin' ) { + function begin( $fname = 'DatabasePostgres::begin' ) { $this->query( 'BEGIN', $fname ); $this->mTrxLevel = 1; }