diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-10-27 12:51:26 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-10-27 21:39:34 +0100 |
commit | 233c49f4b9fc90f5bd023420ed899439fb413db0 (patch) | |
tree | b0df628bd066ae1337a803b476026b5c48b2549f /lib/private/util.php | |
parent | 25a4b5a93581800887fceef7444b0d3702e4f018 (diff) | |
download | nextcloud-server-233c49f4b9fc90f5bd023420ed899439fb413db0.tar.gz nextcloud-server-233c49f4b9fc90f5bd023420ed899439fb413db0.zip |
Make supported DBs configurable within config.php
This commit will make the supported DBs for installation configurable within config.php. By default the following databases are tested: "sqlite", "mysql", "pgsql". The reason behind this is that there might be instances where we want to prevent SQLite to be used by mistake.
To test this play around with the new configuration parameter "supportedDatabases".
Diffstat (limited to 'lib/private/util.php')
-rw-r--r-- | lib/private/util.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/private/util.php b/lib/private/util.php index 858138f58fe..dd131e41310 100644 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -436,12 +436,9 @@ class OC_Util { } $webServerRestart = false; - //check for database drivers - if (!(is_callable('sqlite_open') or class_exists('SQLite3')) - and !is_callable('mysql_connect') - and !is_callable('pg_connect') - and !is_callable('oci_connect') - ) { + $setup = new OC_Setup($config); + $availableDatabases = $setup->getSupportedDatabases(); + if (empty($availableDatabases)) { $errors[] = array( 'error' => $l->t('No database drivers (sqlite, mysql, or postgresql) installed.'), 'hint' => '' //TODO: sane hint |