aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-27 11:25:31 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-27 11:25:31 +0000
commit41fed2568509d6eb581be9aa1df000b25b079d63 (patch)
treef318c78f1337d944a0aaf4798db17b5ebf4c30fc /engine
parent689c997f58b25df81164df9acdf5ebd9c1ad2bc9 (diff)
downloadelgg-41fed2568509d6eb581be9aa1df000b25b079d63.tar.gz
elgg-41fed2568509d6eb581be9aa1df000b25b079d63.tar.bz2
Added a 'display full view' parameter to all of the listings functions
git-svn-id: https://code.elgg.org/elgg/trunk@1170 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/elgglib.php5
-rw-r--r--engine/lib/entities.php5
-rw-r--r--engine/lib/metadata.php10
-rw-r--r--engine/lib/relationships.php5
-rw-r--r--engine/lib/sites.php5
-rw-r--r--engine/lib/users.php10
6 files changed, 24 insertions, 16 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 166757ea4..31693906d 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -350,9 +350,10 @@
* @param int $count The total number of entities across all pages
* @param int $offset The current indexing offset
* @param int $limit The number of entities to display per page
+ * @param true|false $fullview Whether or not to display the full view (default: true)
* @return string The list of entities
*/
- function elgg_view_entity_list($entities, $count, $offset, $limit) {
+ function elgg_view_entity_list($entities, $count, $offset, $limit, $fullview = true) {
$count = (int) $count;
$offset = (int) $offset;
@@ -372,7 +373,7 @@
if (is_array($entities) && sizeof($entities) > 0) {
foreach($entities as $entity) {
- $html .= elgg_view_entity($entity, "", false);
+ $html .= elgg_view_entity($entity, "", $fullview);
}
}
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index c97c560b8..c76e8d970 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -1091,15 +1091,16 @@
* @param string $subtype The arbitrary subtype of the entity
* @param int $owner_guid The GUID of the owning user
* @param int $limit The number of entities to display per page (default: 10)
+ * @param true|false $fullview Whether or not to display the full view (default: true)
* @return string A viewable list of entities
*/
- function list_entities($type= "", $subtype = "", $owner_guid = 0, $limit = 10) {
+ function list_entities($type= "", $subtype = "", $owner_guid = 0, $limit = 10, $fullview = true) {
$offset = (int) get_input('offset');
$count = get_entities($type, $subtype, $owner_guid, "", $limit, $offset, true);
$entities = get_entities($type, $subtype, $owner_guid, "", $limit, $offset);
- return elgg_view_entity_list($entities, $count, $offset, $limit);
+ return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview);
}
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index 51d932c1a..36c2e65c7 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -519,17 +519,18 @@
* @param string $entity_type The type of entity to look for, eg 'site' or 'object'
* @param string $entity_subtype The subtype of the entity
* @param int $limit Number of entities to display per page
+ * @param true|false $fullview Whether or not to display the full view (default: true)
*
* @return string A list of entities suitable for display
*/
- function list_entities_from_metadata($meta_name, $meta_value = "", $entity_type = "", $entity_subtype = "", $owner_guid = 0, $limit = 10) {
+ function list_entities_from_metadata($meta_name, $meta_value = "", $entity_type = "", $entity_subtype = "", $owner_guid = 0, $limit = 10, $fullview = true) {
$offset = (int) get_input('offset');
$limit = (int) $limit;
$count = get_entities_from_metadata($meta_name, $meta_value, $entity_type, $entity_subtype, $owner_guid, $limit, $offset, "", 0, true);
$entities = get_entities_from_metadata($meta_name, $meta_value, $entity_type, $entity_subtype, $owner_guid, $limit, $offset, "", 0, false);
- return elgg_view_entity_list($entities, $count, $offset, $limit);
+ return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview);
}
@@ -625,16 +626,17 @@
* @param int $limit
* @param int $offset
* @param string $order_by Optional ordering.
+ * @param true|false $fullview Whether or not to display the full view (default: true)
* @return string List of ElggEntities suitable for display
*/
- function list_entities_from_metadata_multi($meta_array, $entity_type = "", $entity_subtype = "", $owner_guid = 0, $limit = 10) {
+ function list_entities_from_metadata_multi($meta_array, $entity_type = "", $entity_subtype = "", $owner_guid = 0, $limit = 10, $fullview = true) {
$offset = (int) get_input('offset');
$limit = (int) $limit;
$count = get_entities_from_metadata_multi($meta_array, $entity_type, $entity_subtype, $owner_guid, $limit, $offset, "", $site_guid, true);
$entities = get_entities_from_metadata_multi($meta_array, $entity_type, $entity_subtype, $owner_guid, $limit, $offset, "", $site_guid, false);
- return elgg_view_entity_list($entities, $count, $offset, $limit);
+ return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview);
}
diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php
index 642b2f5c6..b7008409c 100644
--- a/engine/lib/relationships.php
+++ b/engine/lib/relationships.php
@@ -513,16 +513,17 @@
* @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)
* @return string The viewable list of entities
*/
- function list_entities_from_relationship($relationship, $relationship_guid, $inverse_relationship = false, $type = "", $subtype = "", $owner_guid = 0, $limit = 10) {
+ function list_entities_from_relationship($relationship, $relationship_guid, $inverse_relationship = false, $type = "", $subtype = "", $owner_guid = 0, $limit = 10, $fullview = true) {
$limit = (int) $limit;
$offset = (int) get_input('offset');
$count = get_entities_from_relationship($relationship, $relationship_guid, $inverse_relationship, $type, $subtype, $owner_guid, "", $limit, 0, true);
$entities = get_entities_from_relationship($relationship, $relationship_guid, $inverse_relationship, $type, $subtype, $owner_guid, "", $limit, 0);
- return elgg_view_entity_list($entities, $count, $offset, $Limit);
+ return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview);
}
diff --git a/engine/lib/sites.php b/engine/lib/sites.php
index 40ff02f6c..f126e4e4e 100644
--- a/engine/lib/sites.php
+++ b/engine/lib/sites.php
@@ -374,16 +374,17 @@
*
* @param int $site_guid The GUID of the site
* @param int $limit The number of members to display on a page
+ * @param true|false $fullview Whether or not to display the full view (default: true)
* @return string A displayable list of members
*/
- function list_site_members($site_guid, $limit = 10) {
+ function list_site_members($site_guid, $limit = 10, $fullview = true) {
$offset = (int) get_input('offset');
$limit = (int) $limit;
$count = (int) get_entities_from_relationship("member_of_site", $site_guid, true, "user", "", 0, "time_created desc", $limit, $offset, true);
$entities = get_site_members($site_guid, $limit, $offset);
- return elgg_view_entity_list($entities, $count, $offset, $limit);
+ return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview);
}
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 554ada22b..60d279ebf 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -535,16 +535,17 @@
* @param int $user_guid The GUID of the user
* @param string $subtype The object subtype
* @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)
* @return string The list in a form suitable to display
*/
- function list_user_objects($user_guid, $subtype = "", $limit = 10) {
+ function list_user_objects($user_guid, $subtype = "", $limit = 10, $fullview = true) {
$offset = (int) get_input('offset');
$limit = (int) $limit;
$count = (int) count_user_objects($user_guid, $subtype);
$entities = get_user_objects($user_guid, $subtype, $limit, $offset);
- return elgg_view_entity_list($entities, $count, $offset, $limit);
+ return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview);
}
@@ -594,16 +595,17 @@
* @param int $user_guid The GUID of the user
* @param string $subtype The object subtype
* @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)
* @return string The list in a form suitable to display
*/
- function list_user_friends_objects($user_guid, $subtype = "", $limit = 10) {
+ function list_user_friends_objects($user_guid, $subtype = "", $limit = 10, $fullview = true) {
$offset = (int) get_input('offset');
$limit = (int) $limit;
$count = (int) count_user_friends_objects($user_guid, $subtype);
$entities = get_user_friends_objects($user_guid, $subtype, $limit, $offset);
- return elgg_view_entity_list($entities, $count, $offset, $limit);
+ return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview);
}