]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Marcus Povey 20090616:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 16 Jun 2009 15:16:23 +0000 (15:16 +0000)
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 16 Jun 2009 15:16:23 +0000 (15:16 +0000)
* Closes #964: Introduces a plugin hook 'annotations:view', $entity_class (object/user/group/site) called elgg_view_entity on FULL view. This lets you return annotations to an entity and control the order in which they're displayed. Existing views remain un-effected but should probably be retrofitted.
* Version bump.

git-svn-id: https://code.elgg.org/elgg/trunk@3337 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/elgglib.php
version.php

index b80bd9f70fb46bb6a31f56026e37fd08d7a8f64f..3846c98b2061674459f631f191cc71246e36c15c 100644 (file)
                                                                                                                                'entity' => $entity,
                                                                                                                                'full' => $full
                                                                                                                                ), $bypass, $debug);
+                       }
+                       if ($full) // Marcus Povey 20090616 : Speculative and low impact approach for fixing #964
+                       {
+                               $annotations = trigger_plugin_hook('annotations:view', $entity_class, array(
+                                                                                                                                                                               'entity' => $entity,
+                                                                                                                                                                               'full' => $full,
+                               
+                                                                                                                                                                               // We already know this, so pass it on.
+                                                                                                                                                                               'type' => $entity_type,
+                                                                                                                                                                               'subtype' => $subtype
+                                                                                                                                                                               )
+                               );
+                               
+                               if ($annotations)
+                                       $contents .= $annotations;
                        }\r
                        return $contents;
                }
index 4c98fe0e0880390619bd4c13aecef74cbdb0452a..2a0c785778e7598601016d3c1baadf906e09b88a 100644 (file)
@@ -13,7 +13,7 @@
         * @link http://elgg.org/\r
         */\r
 
-          $version = 2009061401;  // YYYYMMDD   = Elgg Date
+          $version = 2009061601;  // YYYYMMDD   = Elgg Date
                                   //         XX = Interim incrementer\r
        \r
           $release = '1.5';    // Human-friendly version name\r