aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-06-17 13:40:51 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-06-17 13:40:51 +0000
commitaf7cac705174546ca6684749538e206aa509bb98 (patch)
tree19a640422ecae4bc1c623b43b82c55863dc41d48
parenta7880dfd3c39c23f26f4f0f1d1cc059707289ff8 (diff)
downloadelgg-af7cac705174546ca6684749538e206aa509bb98.tar.gz
elgg-af7cac705174546ca6684749538e206aa509bb98.tar.bz2
Refs #964: Correct detection of type.
git-svn-id: https://code.elgg.org/elgg/trunk@3341 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/elgglib.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 87f2ec278..7822919c5 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -790,7 +790,16 @@
*/
function elgg_view_entity_annotations(ElggEntity $entity, $full = true)
{
- $annotations = trigger_plugin_hook('entity:annotate', $entity_class,
+ $classes = array(
+ 'ElggUser' => 'user',
+ 'ElggObject' => 'object',
+ 'ElggSite' => 'site',
+ 'ElggGroup' => 'group'
+ );
+
+ $entity_class = get_class($entity);
+
+ $annotations = trigger_plugin_hook('entity:annotate', $classes[$entity_class],
array(
'entity' => $entity,
'full' => $full,