2
0
forked from Wavyzz/dolibarr
This commit is contained in:
Regis Houssin
2012-07-23 10:29:26 +02:00
parent 68f04de488
commit a109d5f32b

View File

@@ -380,10 +380,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") && ! defined('NOLOCALSOCKETPGCONNECT'))
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);
}