Index: openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/Attic/xowiki-portlet-procs.tcl,v diff -u -r1.16 -r1.17 --- openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl 9 Jan 2007 11:47:53 -0000 1.16 +++ openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl 9 Jan 2007 12:49:04 -0000 1.17 @@ -485,9 +485,9 @@ set select_count "select count(distinct user_id) from xowiki_last_visited " if {!$summary} { - set select_users "select distinct user_id,time from xowiki_last_visited " + set select_users "select user_id,max(time) as max_time from xowiki_last_visited " set limit_clause "limit $max_users" - set order_clause "order by time desc $limit_clause" + set order_clause "group by user_id order by max_time desc $limit_clause" } set where_clause "\ where package_id = $package_id \ @@ -527,7 +527,7 @@ } if {$output ne ""} {set output "