Commit ed28e18d authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Pass the $CFG->dbport to ADODB separately from the hostname"

parents 1621c915 7abb6793
...@@ -122,8 +122,10 @@ try { ...@@ -122,8 +122,10 @@ try {
if (empty($CFG->dbhost)) { if (empty($CFG->dbhost)) {
$CFG->dbhost = ''; $CFG->dbhost = '';
} }
else if (!empty($CFG->dbport)) { // The ADODB connection function doesn't have a separate port argument, but the
$CFG->dbhost .= ':'.$CFG->dbport; // postgres7, mysql, and mysqli drivers all support a $this->dbport field.
if (!empty($CFG->dbport)) {
$db->port = $CFG->dbport;
} }
if (!empty($CFG->dbpersist)) { // Use persistent connection (default) if (!empty($CFG->dbpersist)) { // Use persistent connection (default)
$dbconnected = $db->PConnect($CFG->dbhost,$CFG->dbuser,$CFG->dbpass,$CFG->dbname); $dbconnected = $db->PConnect($CFG->dbhost,$CFG->dbuser,$CFG->dbpass,$CFG->dbname);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment