From: Domas Mituzas Date: Mon, 6 Sep 2004 06:57:32 +0000 (+0000) Subject: allow empty server X-Git-Tag: 1.5.0alpha1~2093 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=b915f6168901dd21979566bf9f034e65c1742ef7;p=lhc%2Fweb%2Fwiklou.git allow empty server --- 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" );