From af7cac705174546ca6684749538e206aa509bb98 Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 17 Jun 2009 13:40:51 +0000 Subject: Refs #964: Correct detection of type. git-svn-id: https://code.elgg.org/elgg/trunk@3341 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/elgglib.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'engine/lib') 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, -- cgit v1.2.3