aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/entities.php9
-rw-r--r--mod/profile/icon.php5
2 files changed, 12 insertions, 2 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 74f3cdfc1..3adf4b8ee 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -1871,8 +1871,13 @@
$url = trigger_plugin_hook('entity:icon:url', $entity->getType(), array('entity' => $entity, 'viewtype' => $viewtype, 'size' => $size), $url);
// Fail, so use default
- if (!$url)
- $url = $CONFIG->url . "_graphics/icons/default/$size.png";
+ if (!$url) {
+
+ $test = elgg_view("icon/entity/default/{$size}",array('entity' => $entity));
+ if (!empty($test)) return $test;
+
+ $url = $CONFIG->url . "_graphics/icons/default/$size.png";
+ }
return $url;
}
diff --git a/mod/profile/icon.php b/mod/profile/icon.php
index 33a5cde7f..d99febd8c 100644
--- a/mod/profile/icon.php
+++ b/mod/profile/icon.php
@@ -39,6 +39,11 @@
if (!$success) {
global $CONFIG;
+ $test = elgg_view("icon/user/default/{$size}",array('entity' => $entity));
+ if (!empty($test)) {
+ header("Location: {$test}");
+ exit;
+ }
$contents = @file_get_contents($CONFIG->pluginspath . "profile/graphics/default{$size}.jpg");
}