Skip to content

Commit

Permalink
fixed(icons): always use default viewtype when using fallback icons
Browse files Browse the repository at this point in the history
fixes #12739
  • Loading branch information
jdalsem committed Dec 12, 2019
1 parent 443ab34 commit b2c666b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions engine/classes/Elgg/EntityIconService.php
Expand Up @@ -553,16 +553,16 @@ public function getFallbackIconUrl(ElggEntity $entity, array $params = []) {

foreach ($exts as $ext) {
foreach ([$entity_subtype, 'default'] as $subtype) {
if ($ext == 'svg' && elgg_view_exists("$type/$entity_type/$subtype.svg")) {
if ($ext == 'svg' && elgg_view_exists("$type/$entity_type/$subtype.svg", 'default')) {
return elgg_get_simplecache_url("$type/$entity_type/$subtype.svg");
}
if (elgg_view_exists("$type/$entity_type/$subtype/$size.$ext")) {
if (elgg_view_exists("$type/$entity_type/$subtype/$size.$ext", 'default')) {
return elgg_get_simplecache_url("$type/$entity_type/$subtype/$size.$ext");
}
}
}

if (elgg_view_exists("$type/default/$size.png")) {
if (elgg_view_exists("$type/default/$size.png", 'default')) {
return elgg_get_simplecache_url("$type/default/$size.png");
}
}
Expand Down

0 comments on commit b2c666b

Please sign in to comment.