diff options
author | Jerome Bakker <jeabakker@coldtrick.com> | 2013-05-29 16:45:03 +0200 |
---|---|---|
committer | Jerome Bakker <jeabakker@coldtrick.com> | 2013-05-29 16:45:03 +0200 |
commit | 1c4140c8721f19dc3285fd3ff99cceb716bc126b (patch) | |
tree | 557284ca3cbd68762f29e62075974b0d7126bbed | |
parent | 371e64beb9d47e0b64ce74d83a8587a73908f7d5 (diff) | |
download | elgg-1c4140c8721f19dc3285fd3ff99cceb716bc126b.tar.gz elgg-1c4140c8721f19dc3285fd3ff99cceb716bc126b.tar.bz2 |
fixed: pagination in online members overview
-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 ''; |