aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/setup.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-03-11 15:47:24 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-03-11 15:47:24 +0100
commit96b223676d6f3364530389d49d3518ac6748714d (patch)
treec8657c398a2608e0f366034aa5fd8ef267ca05d9 /lib/private/setup.php
parentcba3ec2c7fb3282401a13c60c2d6f776a6a29e4b (diff)
downloadnextcloud-server-96b223676d6f3364530389d49d3518ac6748714d.tar.gz
nextcloud-server-96b223676d6f3364530389d49d3518ac6748714d.zip
Don't play with config values ...
Diffstat (limited to 'lib/private/setup.php')
-rw-r--r--lib/private/setup.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/private/setup.php b/lib/private/setup.php
index 1da42f0f8a4..44b6ad56cb8 100644
--- a/lib/private/setup.php
+++ b/lib/private/setup.php
@@ -68,10 +68,11 @@ class Setup {
/**
* Get the available and supported databases of this instance
*
- * @throws Exception
+ * @param bool $allowAllDatabases
* @return array
+ * @throws Exception
*/
- public function getSupportedDatabases() {
+ public function getSupportedDatabases($allowAllDatabases = false) {
$availableDatabases = array(
'sqlite' => array(
'type' => 'class',
@@ -99,8 +100,12 @@ class Setup {
'name' => 'MS SQL'
)
);
- $configuredDatabases = $this->config->getSystemValue('supportedDatabases',
- array('sqlite', 'mysql', 'pgsql'));
+ if ($allowAllDatabases) {
+ $configuredDatabases = array_keys($availableDatabases);
+ } else {
+ $configuredDatabases = $this->config->getSystemValue('supportedDatabases',
+ array('sqlite', 'mysql', 'pgsql'));
+ }
if(!is_array($configuredDatabases)) {
throw new Exception('Supported databases are not properly configured.');
}
@@ -131,8 +136,8 @@ class Setup {
* @return array of system info, including an "errors" value
* in case of errors/warnings
*/
- public function getSystemInfo() {
- $databases = $this->getSupportedDatabases();
+ public function getSystemInfo($allowAllDatabases = false) {
+ $databases = $this->getSupportedDatabases($allowAllDatabases);
$dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data');