From 2194fa6ed071bdf62e9b7d5577655b6161d4b289 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Wed, 14 Mar 2007 16:34:50 +0000 Subject: [PATCH] Typo, minor rearrangements, --- includes/DatabasePostgres.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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; } -- 2.20.1