diff options
author | Cash Costello <cash.costello@gmail.com> | 2013-05-30 15:43:47 -0700 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2013-05-30 15:43:47 -0700 |
commit | 25faa618143839e087f55e17c878be85596cf077 (patch) | |
tree | 2790f956ac3cfc614e28211b9dc406c691b3eeb6 /engine/lib/statistics.php | |
parent | bf73ef92f79d4ab245f74ff5f7ed065caa2d5ffe (diff) | |
parent | 1c4140c8721f19dc3285fd3ff99cceb716bc126b (diff) | |
download | elgg-25faa618143839e087f55e17c878be85596cf077.tar.gz elgg-25faa618143839e087f55e17c878be85596cf077.tar.bz2 |
Merge pull request #5553 from jeabakker/working-pagination-in-online-users
The pagination in online members doesn't work
Diffstat (limited to 'engine/lib/statistics.php')
-rw-r--r-- | engine/lib/statistics.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/engine/lib/statistics.php b/engine/lib/statistics.php index 0c9a3c945..4cb0bb0b8 100644 --- a/engine/lib/statistics.php +++ b/engine/lib/statistics.php @@ -95,13 +95,17 @@ function get_number_users($show_deactivated = false) { * @return string */ function get_online_users() { - $count = find_active_users(600, 10, 0, true); - $objects = find_active_users(600, 10); + $limit = max(0, (int) get_input("limit", 10)); + $offset = max(0, (int) get_input("offset", 0)); + + $count = find_active_users(600, $limit, $offset, true); + $objects = find_active_users(600, $limit, $offset); if ($objects) { return elgg_view_entity_list($objects, array( 'count' => $count, - 'limit' => 10, + 'limit' => $limit, + 'offset' => $offset )); } return ''; |