Index: openacs-4/packages/categories/tcl/tagcloud-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/tcl/tagcloud-procs.tcl,v diff -u -r1.8 -r1.8.2.1 --- openacs-4/packages/categories/tcl/tagcloud-procs.tcl 1 Nov 2018 08:50:20 -0000 1.8 +++ openacs-4/packages/categories/tcl/tagcloud-procs.tcl 15 Mar 2019 13:28:50 -0000 1.8.2.1 @@ -104,7 +104,17 @@ # so we should check for the reader's locale and use that # or the default_locale, but ... - set tag_list [db_list_of_lists tagcloud_get_keys {}] + set tag_list [db_list_of_lists tagcloud_get_keys { + select category_id, count(com.object_id), min(trans.name) + from categories + natural left join category_object_map com + natural join category_trees + natural join category_translations trans + where tree_id = :tree_id + and trans.locale = :default_locale + and acs_permission.permission_p(com.object_id, :user_id, 'read') + group by category_id + }] }