aboutsummaryrefslogtreecommitdiffstats
path: root/core/setup
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2014-01-31 17:31:19 +0100
committerBart Visscher <bartv@thisnet.nl>2014-01-31 17:31:19 +0100
commitd8ec7e270167594ed407b22cb9ae78b1501ca946 (patch)
tree116a3a636e0cfca33a8f830b6488615b778eed9a /core/setup
parent12a900de2539a31b0bbfbba9ffa861fb0f36e8cd (diff)
downloadnextcloud-server-d8ec7e270167594ed407b22cb9ae78b1501ca946.tar.gz
nextcloud-server-d8ec7e270167594ed407b22cb9ae78b1501ca946.zip
DRY for database type radiolist
Diffstat (limited to 'core/setup')
-rw-r--r--core/setup/controller.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/core/setup/controller.php b/core/setup/controller.php
index 5189aba2f34..c628bda609b 100644
--- a/core/setup/controller.php
+++ b/core/setup/controller.php
@@ -85,6 +85,22 @@ class Controller {
$hasPostgreSQL = is_callable('pg_connect');
$hasOracle = is_callable('oci_connect');
$hasMSSQL = is_callable('sqlsrv_connect');
+ $databases = array();
+ if ($hasSQLite) {
+ $databases['sqlite'] = 'SQLite';
+ }
+ if ($hasMySQL) {
+ $databases['mysql'] = 'MySQL';
+ }
+ if ($hasPostgreSQL) {
+ $databases['pgsql'] = 'PostgreSQL';
+ }
+ if ($hasOracle) {
+ $databases['oci'] = 'Oracle';
+ }
+ if ($hasMSSQL) {
+ $databases['mssql'] = 'MS SQL';
+ }
$datadir = \OC_Config::getValue('datadirectory', \OC::$SERVERROOT.'/data');
$vulnerableToNullByte = false;
if(@file_exists(__FILE__."\0Nullbyte")) { // Check if the used PHP version is vulnerable to the NULL Byte attack (CVE-2006-7243)
@@ -111,6 +127,7 @@ class Controller {
'hasPostgreSQL' => $hasPostgreSQL,
'hasOracle' => $hasOracle,
'hasMSSQL' => $hasMSSQL,
+ 'databases' => $databases,
'directory' => $datadir,
'secureRNG' => \OC_Util::secureRNGAvailable(),
'htaccessWorking' => $htaccessWorking,