Commit 712c5758 authored by Dries's avatar Dries
Browse files

- Patch #148744 by catch: fixed some code comments.

parent 3f7364b9
......@@ -616,11 +616,11 @@ function user_block($op = 'list', $delta = 0, $edit = array()) {
case 3:
if (user_access('access content')) {
// Count users with activity in the past defined period.
// Count users active within the defined period.
$interval = time() - variable_get('user_block_seconds_online', 900);
// Perform database queries to gather online user lists. We use s.timestamp
// rather than u.access because it is much faster is much faster..
// rather than u.access because it is much faster.
$anonymous_count = sess_count($interval);
$authenticated_users = db_query('SELECT DISTINCT u.uid, FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.timestamp >= %d AND s.uid > 0 ORDER BY s.timestamp DESC', $interval);
$authenticated_count = db_num_rows($authenticated_users);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment