aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Setup/AbstractDatabase.php
diff options
context:
space:
mode:
authorThomas Pulzer <t.pulzer@kniel.de>2016-07-06 09:58:38 +0200
committerThomas Pulzer <t.pulzer@kniel.de>2016-07-06 09:58:38 +0200
commitd367318088c2044427a574b1e42c48deade1bec3 (patch)
treea3cc8b55540ab039eb07f5d2be180c545578bedb /lib/private/Setup/AbstractDatabase.php
parentcf7afabf62d1e3f4c5856d7636e21496d7992257 (diff)
downloadnextcloud-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/AbstractDatabase.php')
-rw-r--r--lib/private/Setup/AbstractDatabase.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/Setup/AbstractDatabase.php b/lib/private/Setup/AbstractDatabase.php
index 331617df19d..08ed741f51c 100644
--- a/lib/private/Setup/AbstractDatabase.php
+++ b/lib/private/Setup/AbstractDatabase.php
@@ -42,6 +42,8 @@ abstract class AbstractDatabase {
/** @var string */
protected $dbHost;
/** @var string */
+ protected $dbPort;
+ /** @var string */
protected $tablePrefix;
/** @var IConfig */
protected $config;
@@ -78,11 +80,13 @@ abstract class AbstractDatabase {
$dbPass = $config['dbpass'];
$dbName = $config['dbname'];
$dbHost = !empty($config['dbhost']) ? $config['dbhost'] : 'localhost';
+ $dbPort = !empty($config['dbport']) ? $config['dbport'] : '';
$dbTablePrefix = isset($config['dbtableprefix']) ? $config['dbtableprefix'] : 'oc_';
$this->config->setSystemValues([
'dbname' => $dbName,
'dbhost' => $dbHost,
+ 'dbport' => $dbPort,
'dbtableprefix' => $dbTablePrefix,
]);
@@ -90,6 +94,7 @@ abstract class AbstractDatabase {
$this->dbPassword = $dbPass;
$this->dbName = $dbName;
$this->dbHost = $dbHost;
+ $this->dbPort = $dbPort;
$this->tablePrefix = $dbTablePrefix;
}