From 8a6223ae8a2a3fd32cdef0becb8a8f0eeba684b2 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 19 Feb 2009 11:30:31 +0000 Subject: Introducing archive functionality. git-svn-id: https://code.elgg.org/elgg/trunk@2803 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/users.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'engine/lib/users.php') diff --git a/engine/lib/users.php b/engine/lib/users.php index f16f5c0f6..f859f9681 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -607,10 +607,12 @@ * @param string $subtype Optionally, the subtype of objects * @param int $limit The number of results to return (default 10) * @param int $offset Indexing offset, if any + * @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 false|array An array of ElggObjects or false, depending on success */ - function get_user_objects($user_guid, $subtype = "", $limit = 10, $offset = 0) { - $ntt = get_entities('object',$subtype, $user_guid, "time_created desc", $limit, $offset,false,0,$user_guid); + function get_user_objects($user_guid, $subtype = "", $limit = 10, $offset = 0, $timelower = 0, $timeupper = 0) { + $ntt = get_entities('object',$subtype, $user_guid, "time_created desc", $limit, $offset,false,0,$user_guid,$timelower, $timeupper); return $ntt; } @@ -635,14 +637,16 @@ * @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) + * @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 string The list in a form suitable to display */ - function list_user_objects($user_guid, $subtype = "", $limit = 10, $fullview = true, $viewtypetoggle = true, $pagination = true) { + function list_user_objects($user_guid, $subtype = "", $limit = 10, $fullview = true, $viewtypetoggle = true, $pagination = true, $timelower = 0, $timeupper = 0) { $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); + $entities = get_user_objects($user_guid, $subtype, $limit, $offset, $timelower, $timeupper); return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, $viewtypetoggle, $pagination); -- cgit v1.2.3