1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-29 20:11:29 +00:00

optional DB_PORT, misc js cleanups

This commit is contained in:
Andrew Dolgov
2006-03-21 11:38:41 +01:00
parent 10031c3b74
commit befc807f83
6 changed files with 19 additions and 18 deletions

6
db.php
View File

@@ -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) {