Skip to content

Commit

Permalink
Respect "port" in database connection configuration.
Browse files Browse the repository at this point in the history
See: phacility/phabricator#356

Reviewed by: epriestley
  • Loading branch information
Levi Jackson authored and epriestley committed Jul 14, 2013
1 parent d7cd593 commit 962c317
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ protected function connect() {

$user = $this->getConfiguration('user');
$host = $this->getConfiguration('host');
$port = $this->getConfiguration('port');

if (!empty($port)) {
$host .= ':'.$port;
}

$database = $this->getConfiguration('database');

$pass = $this->getConfiguration('pass');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ protected function connect() {

$user = $this->getConfiguration('user');
$host = $this->getConfiguration('host');
$port = $this->getConfiguration('port');
$database = $this->getConfiguration('database');

$pass = $this->getConfiguration('pass');
Expand All @@ -44,7 +45,8 @@ protected function connect() {
$host,
$user,
$pass,
$database);
$database,
$port);

$errno = $conn->connect_errno;
if ($errno) {
Expand Down

0 comments on commit 962c317

Please sign in to comment.