diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-06-04 07:24:53 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-06-04 07:24:53 +0000 |
commit | 19b8132289003800bc1c8cde3ccabe286c0172a1 (patch) | |
tree | 92222f91ef6617aafb86762dc95f3ac8d2f2d673 | |
parent | 1fe90cba4f4015846021d0074d3335ba05fea393 (diff) | |
download | brdo-19b8132289003800bc1c8cde3ccabe286c0172a1.tar.gz brdo-19b8132289003800bc1c8cde3ccabe286c0172a1.tar.bz2 |
- Patch #148974 by hunmonk: fixed whois online block on PostgreSQL.
-rw-r--r-- | modules/user/user.module | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/user/user.module b/modules/user/user.module index abf607c35..70b5bfa84 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -623,7 +623,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. |