category::tagcloud::get_tags_no_mem (private)

 category::tagcloud::get_tags_no_mem -tree_id tree_id

Defined in packages/categories/tcl/tagcloud-procs.tcl

Returns a list of categories and their weights (number of objects mapped to each category) for a give category tree.

Switches:
-tree_id
(required)
Author:
Matthew Burke <matt-oacs@bluedino.net>
Created:
Oct 1, 2005

Partial Call Graph (max 5 caller/called nodes):
%3 category::tagcloud::get_tags category::tagcloud::get_tags (public) category::tagcloud::get_tags_no_mem category::tagcloud::get_tags_no_mem category::tagcloud::get_tags->category::tagcloud::get_tags_no_mem ad_conn ad_conn (public) category::tagcloud::get_tags_no_mem->ad_conn db_list_of_lists db_list_of_lists (public) category::tagcloud::get_tags_no_mem->db_list_of_lists parameter::get parameter::get (public) category::tagcloud::get_tags_no_mem->parameter::get

Testcases:
No testcase defined.
Source code:

    set user_locale [ad_conn locale]
    set user_id [ad_conn user_id]
    set default_locale [parameter::get -parameter DefaultLocale -default en_US]
    ns_log Warning "def loc $default_locale"

    # this whole locale thing isn't handled well.
    # categories get inserted in the site's default_locale and
    # the category creator's locale (?)

    # 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 {
        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
    }]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ]
Show another procedure: