aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-10-08 14:30:58 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-10-08 14:30:58 +0000
commitb6ccae4fcde10809993a08dfe1af96738b3b2aea (patch)
tree565b6c1b3ae030fcbedb1b099bceea249cb0dd14 /engine
parent6a8eb8ba9317546b9e89b2c68fb6322b8c3bc00d (diff)
downloadelgg-b6ccae4fcde10809993a08dfe1af96738b3b2aea.tar.gz
elgg-b6ccae4fcde10809993a08dfe1af96738b3b2aea.tar.bz2
Closes #417 & #418
git-svn-id: https://code.elgg.org/elgg/trunk@2223 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/entities.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 3a6e3c035..aca26ddd5 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -1869,8 +1869,6 @@
// Step one, see if anyone knows how to render this in the current view
$url = trigger_plugin_hook('entity:icon:url', $entity->getType(), array('entity' => $entity, 'viewtype' => $viewtype, 'size' => $size), $url);
- if(!@getimagesize($url))
- $url = false; // If not exist then don't use the url
// Fail, so use default
if (!$url)
@@ -1966,15 +1964,15 @@
$viewtype = $params['viewtype'];
$size = $params['size'];
- $url = $CONFIG->url . "views/$viewtype/graphics/icons/$type/$subtype/$size.png";
+ $url = "views/$viewtype/graphics/icons/$type/$subtype/$size.png";
- if(!@getimagesize($url))
- $url = $CONFIG->url . "views/$viewtype/graphics/icons/$type/default/$size.png";
+ if (!@getimagesize($CONFIG->path . $url))
+ $url = "views/$viewtype/graphics/icons/$type/default/$size.png";
- if(!@getimagesize($url))
- $url = $CONFIG->url . "views/$viewtype/graphics/icons/default/$size.png";
+ if(!@getimagesize($CONFIG->path . $url))
+ $url = "views/$viewtype/graphics/icons/default/$size.png";
- return $url;
+ return $CONFIG->url . $url;
}
}