allow connections to pgsql without password

This commit is contained in:
Andrew Dolgov 2010-08-24 14:12:04 +04:00
parent 6485f0a6b6
commit 1d064e0da5
1 changed files with 5 additions and 1 deletions

6
db.php
View File

@ -5,7 +5,11 @@ require_once "config.php";
function db_connect($host, $user, $pass, $db) {
if (DB_TYPE == "pgsql") {
$string = "dbname=$db user=$user password=$pass";
$string = "dbname=$db user=$user";
if ($pass) {
$string .= " password=$pass";
}
if ($host) {
$string .= " host=$host";