summaryrefslogtreecommitdiff
path: root/db.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-03-21 11:38:41 +0100
committerAndrew Dolgov <[email protected]>2006-03-21 11:38:41 +0100
commitbefc807f838f69f73fd07282ba389784fac499ab (patch)
treeb1b85e8e40f2106a1e722c699903c43ef40a0fb4 /db.php
parent10031c3b74a3b9698e8ddbfb2026c56760ad8eb3 (diff)
optional DB_PORT, misc js cleanups
Diffstat (limited to 'db.php')
-rw-r--r--db.php6
1 files changed, 5 insertions, 1 deletions
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) {