From: marcus Date: Wed, 17 Jun 2009 13:40:51 +0000 (+0000) Subject: Refs #964: Correct detection of type. X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=af7cac705174546ca6684749538e206aa509bb98;p=lorea%2Felgg.git Refs #964: Correct detection of type. git-svn-id: https://code.elgg.org/elgg/trunk@3341 36083f99-b078-4883-b0ff-0f9b5a30f544 --- 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,