- Patch #148974 by hunmonk: fixed whois online block on PostgreSQL.

5.x
Neil Drumm 2007-06-05 07:41:24 +00:00
parent 0416242f16
commit bc88867047
1 changed files with 1 additions and 1 deletions

View File

@ -588,7 +588,7 @@ function user_block($op = 'list', $delta = 0, $edit = array()) {
// Perform database queries to gather online user lists. We use s.timestamp
// rather than u.access because it is much faster.
$anonymous_count = sess_count($interval);
$authenticated_users = db_query('SELECT DISTINCT u.uid, u.name 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_users = db_query('SELECT DISTINCT u.uid, u.name, s.timestamp 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);
// Format the output with proper grammar.