diff options
author | Thomas Pulzer <t.pulzer@kniel.de> | 2016-07-06 09:58:38 +0200 |
---|---|---|
committer | Thomas Pulzer <t.pulzer@kniel.de> | 2016-07-06 09:58:38 +0200 |
commit | d367318088c2044427a574b1e42c48deade1bec3 (patch) | |
tree | a3cc8b55540ab039eb07f5d2be180c545578bedb /lib/private/Setup/MySQL.php | |
parent | cf7afabf62d1e3f4c5856d7636e21496d7992257 (diff) | |
download | nextcloud-server-d367318088c2044427a574b1e42c48deade1bec3.tar.gz nextcloud-server-d367318088c2044427a574b1e42c48deade1bec3.zip |
Added occ install option for database-port.
Extended the database setup to store the database port.
Changed the PostgreSQL connection error message for clarification.
Diffstat (limited to 'lib/private/Setup/MySQL.php')
-rw-r--r-- | lib/private/Setup/MySQL.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/private/Setup/MySQL.php b/lib/private/Setup/MySQL.php index 1467eb734d7..1ff7b278b86 100644 --- a/lib/private/Setup/MySQL.php +++ b/lib/private/Setup/MySQL.php @@ -100,8 +100,14 @@ class MySQL extends AbstractDatabase { 'tablePrefix' => $this->tablePrefix, ); - // adding port support - if (strpos($this->dbHost, ':')) { + // adding port support through installer + if(!empty($this->dbPort)) { + if (ctype_digit($this->dbPort)) { + $connectionParams['port'] = $this->dbPort; + } else { + $connectionParams['unix_socket'] = $this->dbPort; + } + } else if (strpos($this->dbHost, ':')) { // Host variable may carry a port or socket. list($host, $portOrSocket) = explode(':', $this->dbHost, 2); if (ctype_digit($portOrSocket)) { |