aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/users.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-19 11:49:57 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-19 11:49:57 +0000
commitd74f54a7166fc25d4fbffd85447a33387f63f513 (patch)
tree5546826b7c683521220e4ec7e08139ce817fafc0 /engine/lib/users.php
parent9cd7a8d71691190e0fc42d47c4e40ea8e59365d4 (diff)
downloadelgg-d74f54a7166fc25d4fbffd85447a33387f63f513.tar.gz
elgg-d74f54a7166fc25d4fbffd85447a33387f63f513.tar.bz2
Fix for user object counting with upper and lower time limits.
git-svn-id: https://code.elgg.org/elgg/trunk@2806 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/users.php')
-rw-r--r--engine/lib/users.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index f859f9681..94cf9684a 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -621,10 +621,12 @@
*
* @param int $user_guid The GUID of the owning user
* @param string $subtype Optionally, the subtype of objects
+ * @param int $timelower The earliest time the entity can have been created. Default: all
+ * @param int $timeupper The latest time the entity can have been created. Default: all
* @return int The number of objects the user owns (of this subtype)
*/
- function count_user_objects($user_guid, $subtype = "") {
- $total = get_entities('object', $subtype, $user_guid, "time_created desc", null, null, true, 0, $user_guid);
+ function count_user_objects($user_guid, $subtype = "", $timelower, $timeupper) {
+ $total = get_entities('object', $subtype, $user_guid, "time_created desc", null, null, true, 0, $user_guid,$timelower,$timeupper);
return $total;
}
@@ -645,7 +647,7 @@
$offset = (int) get_input('offset');
$limit = (int) $limit;
- $count = (int) count_user_objects($user_guid, $subtype);
+ $count = (int) count_user_objects($user_guid, $subtype,$timelower,$timeupper);
$entities = get_user_objects($user_guid, $subtype, $limit, $offset, $timelower, $timeupper);
return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, $viewtypetoggle, $pagination);