Index: openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql 15 Jul 2005 21:01:52 -0000 1.8 +++ openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql 26 Jul 2005 12:58:03 -0000 1.9 @@ -21,7 +21,8 @@ where groups.group_id not in ('-1','[contacts::default_group]') and groups.group_id not in ( select gcm.component_id from group_component_map gcm where gcm.group_id != -1 ) and acs_permission__permission_p(groups.group_id,:user_id,:privilege_required) - order by CASE WHEN contact_groups.default_p THEN '000000000' ELSE upper(groups.group_name) END + $filter_clause + order by mapped_p desc, CASE WHEN contact_groups.default_p THEN '000000000' ELSE upper(groups.group_name) END