This commit is contained in:
Regis Houssin 2012-07-23 10:31:58 +02:00
parent 0b77cb3a5d
commit a4ec4224b0

View File

@ -386,10 +386,9 @@ class DoliDBPgsql
if (! $name) $name="postgres"; // When try to connect using admin user
// try first Unix domain socket (local)
if (! $host || $host == "" || $host == "localhost" || $host == "127.0.0.1")
if ((empty($host) || $host == "socket") && ! defined('NOLOCALSOCKETPGCONNECT'))
{
$con_string = "dbname='".$name."' user='".$login."' password='".$passwd."'"; // $name may be empty
//print "$con_string";exit;
$this->db = pg_connect($con_string);
}