aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/entities.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-10-08 15:13:43 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-10-08 15:13:43 +0000
commit607c2d8d9284923e890e8937f28716bb5d3cdfd2 (patch)
treeab437267c469f7d891f8a22306cc15d69ab5e2e7 /engine/lib/entities.php
parent02d4828a86ae00355ebe750d7d121d2dfd29e57e (diff)
downloadelgg-607c2d8d9284923e890e8937f28716bb5d3cdfd2.tar.gz
elgg-607c2d8d9284923e890e8937f28716bb5d3cdfd2.tar.bz2
Default icon overrides.
git-svn-id: https://code.elgg.org/elgg/trunk@2226 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r--engine/lib/entities.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 3adf4b8ee..ba376917b 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -1873,9 +1873,17 @@
// Fail, so use default
if (!$url) {
- $test = elgg_view("icon/entity/default/{$size}",array('entity' => $entity));
- if (!empty($test)) return $test;
-
+ $type = $entity->getType();
+ $subtype = $entity->getSubtype();
+
+ if (!empty($subtype)) {
+ $overrideurl = elgg_view("icon/{$type}/{$subtype}/{$size}",array('entity' => $entity));
+ if (!empty($overrideurl)) return $overrideurl;
+ }
+
+ $overrideurl = elgg_view("icon/{$type}/default/{$size}",array('entity' => $entity));
+ if (!empty($overrideurl)) return $overrideurl;
+
$url = $CONFIG->url . "_graphics/icons/default/$size.png";
}