Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
ed3809b1
Commit
ed3809b1
authored
Mar 20, 2017
by
Vincent Petry
Committed by
GitHub
Mar 20, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #27413 from owncloud/app-icon
Fix app icon detection code
parents
26d768b8
40633b0a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
lib/private/NavigationManager.php
lib/private/NavigationManager.php
+6
-4
lib/private/URLGenerator.php
lib/private/URLGenerator.php
+1
-1
No files found.
lib/private/NavigationManager.php
View file @
ed3809b1
...
...
@@ -153,23 +153,25 @@ class NavigationManager implements INavigationManager {
$route
=
$this
->
urlGenerator
->
linkToRoute
(
$nav
[
'route'
]);
$name
=
isset
(
$nav
[
'name'
])
?
$nav
[
'name'
]
:
ucfirst
(
$app
);
$icon
=
isset
(
$nav
[
'icon'
])
?
$nav
[
'icon'
]
:
'app.svg'
;
$iconPath
=
null
;
foreach
([
$icon
,
"
$app
.svg"
]
as
$i
)
{
try
{
$icon
=
$this
->
urlGenerator
->
imagePath
(
$app
,
$i
);
$icon
Path
=
$this
->
urlGenerator
->
imagePath
(
$app
,
$i
);
break
;
}
catch
(
\
RuntimeException
$ex
)
{
// no icon? - ignore it then
}
}
if
(
is_null
(
$icon
))
{
$icon
=
$this
->
urlGenerator
->
imagePath
(
'core'
,
'default-app-icon'
);
if
(
is_null
(
$iconPath
))
{
$iconPath
=
$this
->
urlGenerator
->
imagePath
(
'core'
,
'default-app-icon'
);
}
$this
->
add
([
'id'
=>
$app
,
'order'
=>
$order
,
'href'
=>
$route
,
'icon'
=>
$icon
,
'icon'
=>
$icon
Path
,
'name'
=>
$l
->
t
(
$name
),
]);
}
...
...
lib/private/URLGenerator.php
View file @
ed3809b1
...
...
@@ -157,7 +157,7 @@ class URLGenerator implements IURLGenerator {
$path
=
$this
->
getImagePath
(
$app
,
$image
);
if
(
$path
!==
''
)
{
if
(
$path
!==
''
&&
!
is_null
(
$path
)
)
{
$cache
->
set
(
$cacheKey
,
$path
);
return
$path
;
}
else
{
...
...
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