From b915f6168901dd21979566bf9f034e65c1742ef7 Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Mon, 6 Sep 2004 06:57:32 +0000 Subject: [PATCH] allow empty server --- includes/DatabasePostgreSQL.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/DatabasePostgreSQL.php b/includes/DatabasePostgreSQL.php index 20b2617222..45aaedee86 100644 --- a/includes/DatabasePostgreSQL.php +++ b/includes/DatabasePostgreSQL.php @@ -63,7 +63,10 @@ class DatabasePgsql extends Database { if ( '' != $dbName ) { # start a database connection - @$this->mConn = pg_connect("host=$server dbname=$dbName user=$user password=$password"); + if ($server!=false && $server!="") { + $hstring="host=$server "; + } + @$this->mConn = pg_connect("$hstring dbname=$dbName user=$user password=$password"); if ( $this->mConn == false ) { wfDebug( "DB connection error\n" ); wfDebug( "Server: $server, Database: $dbName, User: $user, Password: " . substr( $password, 0, 3 ) . "...\n" ); -- 2.20.1