aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/statistics.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-19 14:15:58 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-19 14:15:58 +0000
commit8b7cf8710c8cbb5e6db2bc57e05dffc7bfcf0681 (patch)
tree9a2a1056775b0a6aa43c188ca81678ae5ba5c038 /engine/lib/statistics.php
parentb54981abca82d285403c05101cb03573d5590dab (diff)
downloadelgg-8b7cf8710c8cbb5e6db2bc57e05dffc7bfcf0681.tar.gz
elgg-8b7cf8710c8cbb5e6db2bc57e05dffc7bfcf0681.tar.bz2
Fixes #55 : "Users online now" function
git-svn-id: https://code.elgg.org/elgg/trunk@998 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/statistics.php')
-rw-r--r--engine/lib/statistics.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/engine/lib/statistics.php b/engine/lib/statistics.php
index 844cbfa01..8744db4ab 100644
--- a/engine/lib/statistics.php
+++ b/engine/lib/statistics.php
@@ -79,13 +79,16 @@
}
/**
- * Return a list of how many users are currently online.
- *
- * @param int $limit Number of users to return
+ * Return a list of how many users are currently online, rendered as a view.
*/
- function get_online_users($limit = 10)
+ function get_online_users()
{
- // TODO: Writeme
+ $objects = find_active_users();
+
+ if ($objects)
+ {
+ return elgg_view_entity_list($objects, count($objects), 0, 10);
+ }
}
/**