From befc807f838f69f73fd07282ba389784fac499ab Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 21 Mar 2006 11:38:41 +0100 Subject: optional DB_PORT, misc js cleanups --- db.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'db.php') diff --git a/db.php b/db.php index 16d399220..fb2b8a4b9 100644 --- a/db.php +++ b/db.php @@ -5,12 +5,16 @@ 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 password=$pass"; if ($host) { $string .= " host=$host"; } + if (defined('DB_PORT')) { + $string = "$string port=" . DB_PORT; + } + $link = pg_connect($string); if (!$link) { -- cgit v1.2.3-54-g00ecf