aboutsummaryrefslogtreecommitdiffstats
path: root/include/dba/dba_driver.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-08-23 18:18:05 -0700
committerredmatrix <git@macgirvin.com>2016-08-23 18:18:05 -0700
commitd3369384d15e13dba937fa89dabc273e3ca672e8 (patch)
tree51c8e3ca50679abdb9aea20dcebf7470adabe799 /include/dba/dba_driver.php
parent1e6a491400eaa01aeb2991d4b38e0255499d8b67 (diff)
downloadvolse-hubzilla-d3369384d15e13dba937fa89dabc273e3ca672e8.tar.gz
volse-hubzilla-d3369384d15e13dba937fa89dabc273e3ca672e8.tar.bz2
volse-hubzilla-d3369384d15e13dba937fa89dabc273e3ca672e8.zip
include port in pdo url when host is 'localhost'
Diffstat (limited to 'include/dba/dba_driver.php')
-rwxr-xr-xinclude/dba/dba_driver.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/dba/dba_driver.php b/include/dba/dba_driver.php
index f6091f6e1..7225a9be2 100755
--- a/include/dba/dba_driver.php
+++ b/include/dba/dba_driver.php
@@ -62,6 +62,8 @@ class DBA {
if(is_object(self::$dba) && self::$dba->connected) {
+ if($server === 'localhost')
+ $port = $set_port;
$dns = ((self::$dbtype == DBTYPE_POSTGRES) ? 'postgres' : 'mysql')
. ':host=' . $server . (is_null($port) ? '' : ';port=' . $port)
. ';dbname=' . $db;