From ae8f2d40a887125490819d7b51b3f78c1dbc0261 Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 20 Jan 2009 18:29:28 +0000 Subject: Added toggling for the annotation sum list functions. git-svn-id: https://code.elgg.org/elgg/trunk@2587 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/annotations.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php index 6136ea4b0..d17bb9568 100644 --- a/engine/lib/annotations.php +++ b/engine/lib/annotations.php @@ -681,8 +681,8 @@ * @param true|false $count * @return unknown */ - function get_entities_from_annotation_count($entity_type = "", $entity_subtype = "", $name = "", $owner_guid = 0, $limit = 10, $offset = 0, $count = false) { - return __get_entities_from_annotations_calculate_x('sum',$entity_type,$entity_subtype,$name,$owner_guid,$limit, $offset, $count); + function get_entities_from_annotation_count($entity_type = "", $entity_subtype = "", $name = "", $owner_guid = 0, $limit = 10, $offset = 0, $orderdir = 'desc', $count = false) { + return __get_entities_from_annotations_calculate_x('sum',$entity_type,$entity_subtype,$name,$owner_guid,$limit, $offset, $orderdir, $count); } /** @@ -699,7 +699,7 @@ * @param boolean $viewtypetoggle Determines whether or not the 'gallery' view can be displayed (default: no) * @return string Formatted entity list */ - function list_entities_from_annotation_count($entity_type = "", $entity_subtype = "", $name = "", $limit = 10, $owner_guid = 0, $group_guid = 0, $asc = false, $fullview = true, $viewtypetoggle = false) { + function list_entities_from_annotation_count($entity_type = "", $entity_subtype = "", $name = "", $limit = 10, $owner_guid = 0, $group_guid = 0, $asc = false, $fullview = true, $viewtypetoggle = false, $pagination = true, $orderdir = 'desc') { if ($asc) { $asc = "asc"; @@ -708,10 +708,10 @@ } $offset = (int) get_input("offset",0); - $count = get_entities_from_annotation_count($entity_type, $entity_subtype, $name, $owner_guid, $limit, $offset, true); - $entities = get_entities_from_annotation_count($entity_type, $entity_subtype, $name, $owner_guid, $limit, $offset, true); + $count = get_entities_from_annotation_count($entity_type, $entity_subtype, $name, $owner_guid, $limit, $offset, $orderdir, true); + $entities = get_entities_from_annotation_count($entity_type, $entity_subtype, $name, $owner_guid, $limit, $offset, $orderdir, false); - return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, $viewtypetoggle); + return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, $viewtypetoggle, $pagination); } -- cgit v1.2.3