]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #964: Correct detection of type.
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 17 Jun 2009 13:40:51 +0000 (13:40 +0000)
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 17 Jun 2009 13:40:51 +0000 (13:40 +0000)
git-svn-id: https://code.elgg.org/elgg/trunk@3341 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/elgglib.php

index 87f2ec2783ab5e65ad06e1f25cc7410063d6b380..7822919c5bb4e9adccd7f483eed215450f91437f 100644 (file)
         */
                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,