]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
fixed: pagination in online members overview
authorJerome Bakker <jeabakker@coldtrick.com>
Wed, 29 May 2013 14:45:03 +0000 (16:45 +0200)
committerJerome Bakker <jeabakker@coldtrick.com>
Wed, 29 May 2013 14:45:03 +0000 (16:45 +0200)
engine/lib/statistics.php

index 0c9a3c945b16fe4f9458e27e81d92b0f0bd61086..4cb0bb0b8e0818b2de41647afd889e311ddf1083 100644 (file)
@@ -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 '';