diff options
author | Andrew Dolgov <[email protected]> | 2010-08-24 14:12:04 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-08-24 14:12:04 +0400 |
commit | 1d064e0da50c53708a593e50932fe35eddc55278 (patch) | |
tree | 1d975cebab726b5452538585ccc7cdffcbadce2c | |
parent | 6485f0a6b60a98503e704e2b3f2d5512a66b620b (diff) |
allow connections to pgsql without password
-rw-r--r-- | db.php | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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"; |