Index: openacs-4/packages/categories/tcl/category-trees-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/tcl/category-trees-procs.tcl,v diff -u -N -r1.13 -r1.13.2.1 --- openacs-4/packages/categories/tcl/category-trees-procs.tcl 29 Jun 2004 10:17:52 -0000 1.13 +++ openacs-4/packages/categories/tcl/category-trees-procs.tcl 6 Sep 2005 15:20:11 -0000 1.13.2.1 @@ -467,6 +467,20 @@ } { return "categories-browse?tree_ids=$object_id" } + + ad_proc -public get_id { + name + {locale en_US} + } { + Gets the id of a category tree given a name. + + @param name the name of the category tree to retrieve + @param locale the locale in which the name is supplied + @return the tree id or empty string it no category tree was found + @author Timo Hentschel (timo@timohentschel.de) + } { + return [db_list get_category_tree_id {}] + } } Index: openacs-4/packages/categories/tcl/category-trees-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/tcl/category-trees-procs.xql,v diff -u -N -r1.6 -r1.6.2.1 --- openacs-4/packages/categories/tcl/category-trees-procs.xql 3 Jun 2004 20:28:48 -0000 1.6 +++ openacs-4/packages/categories/tcl/category-trees-procs.xql 6 Sep 2005 15:20:11 -0000 1.6.2.1 @@ -24,6 +24,17 @@ + + + + select tree_id + from category_tree_translations + where name = :name + and locale = :locale + + + +