diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-03-11 16:14:54 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-03-11 16:14:54 +0100 |
commit | 73dc02d42c385cc451eb65d0aaf6ec06eaceb6a6 (patch) | |
tree | bb2c296d8f855cf8d5d569848401b30aad7fb871 | |
parent | caa672ceeb7a972d892fff231237f7586e9deafb (diff) | |
parent | 96b223676d6f3364530389d49d3518ac6748714d (diff) | |
download | nextcloud-server-73dc02d42c385cc451eb65d0aaf6ec06eaceb6a6.tar.gz nextcloud-server-73dc02d42c385cc451eb65d0aaf6ec06eaceb6a6.zip |
Merge pull request #14798 from owncloud/enable-oci-autotest-master
Setting oci as supported database
-rw-r--r-- | core/command/maintenance/install.php | 2 | ||||
-rw-r--r-- | lib/private/setup.php | 17 |
2 files changed, 12 insertions, 7 deletions
diff --git a/core/command/maintenance/install.php b/core/command/maintenance/install.php index e92a546daac..eecdb08e620 100644 --- a/core/command/maintenance/install.php +++ b/core/command/maintenance/install.php @@ -41,7 +41,7 @@ class Install extends Command { // validate the environment $setupHelper = new Setup($this->config, \OC::$server->getIniWrapper(), \OC::$server->getL10N('lib'), new \OC_Defaults()); - $sysInfo = $setupHelper->getSystemInfo(); + $sysInfo = $setupHelper->getSystemInfo(true); $errors = $sysInfo['errors']; if (count($errors) > 0) { $this->printErrors($output, $errors); 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'); |