Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Pulzer <t.pulzer@kniel.de>2016-07-06 10:58:38 +0300
committerThomas Pulzer <t.pulzer@kniel.de>2016-07-06 10:58:38 +0300
commitd367318088c2044427a574b1e42c48deade1bec3 (patch)
treea3cc8b55540ab039eb07f5d2be180c545578bedb /lib/private/Setup/MySQL.php
parentcf7afabf62d1e3f4c5856d7636e21496d7992257 (diff)
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.php10
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)) {