Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
73dc02d4
Commit
73dc02d4
authored
Mar 11, 2015
by
Lukas Reschke
Browse files
Merge pull request #14798 from owncloud/enable-oci-autotest-master
Setting oci as supported database
parents
caa672ce
96b22367
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/command/maintenance/install.php
View file @
73dc02d4
...
...
@@ -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
);
...
...
lib/private/setup.php
View file @
73dc02d4
...
...
@@ -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'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment