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
b55ac514
Commit
b55ac514
authored
Dec 02, 2014
by
Thomas Müller
Browse files
no nested xml tags on dependencies
parent
eb81c52b
Changes
4
Show whitespace changes
Inline
Side-by-side
lib/private/app/dependencyanalyzer.php
View file @
b55ac514
...
@@ -65,11 +65,11 @@ class DependencyAnalyzer {
...
@@ -65,11 +65,11 @@ class DependencyAnalyzer {
}
}
private
function
analyseSupportedDatabases
()
{
private
function
analyseSupportedDatabases
()
{
if
(
!
isset
(
$this
->
dependencies
[
'database
s
'
]))
{
if
(
!
isset
(
$this
->
dependencies
[
'database'
]))
{
return
;
return
;
}
}
$supportedDatabases
=
$this
->
dependencies
[
'database
s
'
];
$supportedDatabases
=
$this
->
dependencies
[
'database'
];
if
(
empty
(
$supportedDatabases
))
{
if
(
empty
(
$supportedDatabases
))
{
return
;
return
;
}
}
...
...
tests/data/app/expected-info.json
View file @
b55ac514
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
"max-version"
:
"5.5"
"max-version"
:
"5.5"
}
}
},
},
"databases"
:
{
"database"
:
[
"database"
:
[
{
{
"@attributes"
:
{
"@attributes"
:
{
...
@@ -31,8 +30,7 @@
...
@@ -31,8 +30,7 @@
},
},
"@value"
:
"sqlite"
},
"@value"
:
"sqlite"
},
"mysql"
"mysql"
]
],
},
"command"
:
[
"command"
:
[
{
{
"@attributes"
:
{
"@attributes"
:
{
...
...
tests/data/app/valid-info.xml
View file @
b55ac514
...
@@ -21,10 +21,8 @@
...
@@ -21,10 +21,8 @@
<ocsid>
166047
</ocsid>
<ocsid>
166047
</ocsid>
<dependencies>
<dependencies>
<php
min-version=
"5.4"
max-version=
"5.5"
/>
<php
min-version=
"5.4"
max-version=
"5.5"
/>
<databases>
<database
min-version=
"3.0"
>
sqlite
</database>
<database
min-version=
"3.0"
>
sqlite
</database>
<database>
mysql
</database>
<database>
mysql
</database>
</databases>
<command
os=
"linux"
>
grep
</command>
<command
os=
"linux"
>
grep
</command>
<command
os=
"windows"
>
notepad.exe
</command>
<command
os=
"windows"
>
notepad.exe
</command>
</dependencies>
</dependencies>
...
...
tests/lib/app/dependencyanalyzer.php
View file @
b55ac514
...
@@ -77,7 +77,7 @@ class DependencyAnalyzer extends \PHPUnit_Framework_TestCase {
...
@@ -77,7 +77,7 @@ class DependencyAnalyzer extends \PHPUnit_Framework_TestCase {
)
)
);
);
if
(
!
is_null
(
$databases
))
{
if
(
!
is_null
(
$databases
))
{
$app
[
'dependencies'
][
'database
s
'
]
=
$databases
;
$app
[
'dependencies'
][
'database'
]
=
$databases
;
}
}
$analyser
=
new
\
OC\App\DependencyAnalyzer
(
$app
,
$this
->
platformMock
,
$this
->
l10nMock
);
$analyser
=
new
\
OC\App\DependencyAnalyzer
(
$app
,
$this
->
platformMock
,
$this
->
l10nMock
);
$missing
=
$analyser
->
analyze
();
$missing
=
$analyser
->
analyze
();
...
...
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