]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Moved list_entities_groups to groups.php and deprecated in favor of elgg_list_entities
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 3 Nov 2010 23:13:36 +0000 (23:13 +0000)
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 3 Nov 2010 23:13:36 +0000 (23:13 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7232 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/entities.php
engine/lib/group.php

index 36e9eb115dfd6cd1122e3856a7e49d94a3ba4fba..84dd7820eda783a328fcb2bc82ef0897767cd6d9 100644 (file)
@@ -1397,38 +1397,6 @@ $viewtypetoggle = false, $pagination = true) {
        return elgg_list_entities($options);
 }
 
-/**
- * Lists entities that belong to a group.
- *
- * @warning This function is redundant and will be deprecated in 1.8.
- * The preferred method of listing group entities is by setting the
- * container guid option in {@link elgg_list_entities()}.
- *
- * @param string $subtype        The arbitrary subtype of the entity
- * @param int    $owner_guid     The GUID of the owning user
- * @param int    $container_guid The GUID of the containing group
- * @param int    $limit          The number of entities to display per page (default: 10)
- * @param bool   $fullview       Whether or not to display the full view (default: true)
- * @param bool   $viewtypetoggle Whether or not to allow gallery view (default: true)
- * @param bool   $pagination     Whether to display pagination (default: true)
- *
- * @return string List of parsed entities
- *
- * @see elgg_list_entities()
- */
-function list_entities_groups($subtype = "", $owner_guid = 0, $container_guid = 0,
-$limit = 10, $fullview = true, $viewtypetoggle = true, $pagination = true) {
-
-       $offset = (int) get_input('offset');
-       $count = get_objects_in_group($container_guid, $subtype, $owner_guid,
-               0, "", $limit, $offset, true);
-       $entities = get_objects_in_group($container_guid, $subtype, $owner_guid,
-               0, "", $limit, $offset);
-
-       return elgg_view_entity_list($entities, $count, $offset, $limit,
-               $fullview, $viewtypetoggle, $pagination);
-}
-
 /**
  * Returns a list of months in which entities were updated or created.
  *
index 6b480df0cc59c00ae68fead039a0640471d3a753..85c5e79bf1a7f395b13000f62af79e2780456783 100644 (file)
@@ -264,6 +264,35 @@ $order_by = "", $limit = 10, $offset = 0, $count = FALSE) {
        }
 }
 
+/**
+ * Lists entities that belong to a group.
+ *
+ * @param string $subtype        The arbitrary subtype of the entity
+ * @param int    $owner_guid     The GUID of the owning user
+ * @param int    $container_guid The GUID of the containing group
+ * @param int    $limit          The number of entities to display per page (default: 10)
+ * @param bool   $fullview       Whether or not to display the full view (default: true)
+ * @param bool   $viewtypetoggle Whether or not to allow gallery view (default: true)
+ * @param bool   $pagination     Whether to display pagination (default: true)
+ *
+ * @return string List of parsed entities
+ *
+ * @see elgg_list_entities()
+ * @deprecated 1.8 Use elgg_list_entities() instead
+ */
+function list_entities_groups($subtype = "", $owner_guid = 0, $container_guid = 0,
+$limit = 10, $fullview = true, $viewtypetoggle = true, $pagination = true) {
+       elgg_deprecated_notice("list_entities_groups was deprecated in 1.8.  Use elgg_list_entities() instead.", 1.8);
+       $offset = (int) get_input('offset');
+       $count = get_objects_in_group($container_guid, $subtype, $owner_guid,
+               0, "", $limit, $offset, true);
+       $entities = get_objects_in_group($container_guid, $subtype, $owner_guid,
+               0, "", $limit, $offset);
+
+       return elgg_view_entity_list($entities, $count, $offset, $limit,
+               $fullview, $viewtypetoggle, $pagination);
+}
+
 /**
  * Get all the entities from metadata from a group.
  *