]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #2583, #2754: Merged r7445-7446 to trunk.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 31 Dec 2010 17:29:15 +0000 (17:29 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 31 Dec 2010 17:29:15 +0000 (17:29 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7794 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/relationships.php

index ff069fa487030a8476fa844e698d3d80939d662e..123778d8900489117226746ac297844920c7c78a 100644 (file)
@@ -414,12 +414,29 @@ function elgg_list_entities_from_relationship(array $options = array()) {
 }
 
 /**
+ * Returns a viewable list of entities by relationship
+ *
+ * @see elgg_view_entity_list
+ *
  * @deprecated 1.8 Use elgg_list_entities_from_relationship()
+ *
+ * @param string $relationship The relationship eg "friends_of"
+ * @param int $relationship_guid The guid of the entity to use query
+ * @param bool $inverse_relationship Reverse the normal function of the query to instead say "give me all entities for whome $relationship_guid is a $relationship of"
+ * @param string $type The type of entity (eg 'object')
+ * @param string $subtype The entity subtype
+ * @param int $owner_guid The owner (default: all)
+ * @param int $limit The number of entities to display on a page
+ * @param true|false $fullview Whether or not to display the full view (default: true)
+ * @param true|false $viewtypetoggle Whether or not to allow gallery view
+ * @param true|false $pagination Whether to display pagination (default: true)
+ * @param bool $order_by SQL order by clause
+ * @return string The viewable list of entities
  */
 function list_entities_from_relationship($relationship, $relationship_guid,
 $inverse_relationship = false, $type = ELGG_ENTITIES_ANY_VALUE,
 $subtype = ELGG_ENTITIES_ANY_VALUE, $owner_guid = 0, $limit = 10,
-$fullview = true, $listtypetoggle = false, $pagination = true) {
+$fullview = true, $listtypetoggle = false, $pagination = true, $order_by = '') {
 
        elgg_deprecated_notice("list_entities_from_relationship was deprecated by elgg_list_entities_from_relationship()!", 1.8);
        return elgg_list_entities_from_relationship(array(
@@ -429,6 +446,7 @@ $fullview = true, $listtypetoggle = false, $pagination = true) {
                'types' => $type,
                'subtypes' => $subtype,
                'owner_guid' => $owner_guid,
+               'order_by' => $order_by,
                'limit' => $limit,
                'full_view' => $fullview,
                'list_type_toggle' => $listtypetoggle,