diff options
author | redmatrix <git@macgirvin.com> | 2016-08-23 18:18:05 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-08-23 18:18:05 -0700 |
commit | d3369384d15e13dba937fa89dabc273e3ca672e8 (patch) | |
tree | 51c8e3ca50679abdb9aea20dcebf7470adabe799 | |
parent | 1e6a491400eaa01aeb2991d4b38e0255499d8b67 (diff) | |
download | volse-hubzilla-d3369384d15e13dba937fa89dabc273e3ca672e8.tar.gz volse-hubzilla-d3369384d15e13dba937fa89dabc273e3ca672e8.tar.bz2 volse-hubzilla-d3369384d15e13dba937fa89dabc273e3ca672e8.zip |
include port in pdo url when host is 'localhost'
-rwxr-xr-x | include/dba/dba_driver.php | 2 |
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; |