diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-01-20 18:29:28 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-01-20 18:29:28 +0000 |
commit | ae8f2d40a887125490819d7b51b3f78c1dbc0261 (patch) | |
tree | 57dc93c2f1c13bc887ff3a34622e1b857ae95ec8 /engine/lib/annotations.php | |
parent | c1778720682bef79c7324cb1a1319d370a9c8d32 (diff) | |
download | elgg-ae8f2d40a887125490819d7b51b3f78c1dbc0261.tar.gz elgg-ae8f2d40a887125490819d7b51b3f78c1dbc0261.tar.bz2 |
Added toggling for the annotation sum list functions.
git-svn-id: https://code.elgg.org/elgg/trunk@2587 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/annotations.php')
-rw-r--r-- | engine/lib/annotations.php | 12 |
1 files 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);
}
|