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 -r1.14 -r1.15 --- openacs-4/packages/categories/tcl/category-trees-procs.tcl 6 Jun 2005 08:56:07 -0000 1.14 +++ openacs-4/packages/categories/tcl/category-trees-procs.tcl 16 Jun 2005 09:48:54 -0000 1.15 @@ -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/Attic/category-trees-procs.xql,v diff -u -r1.6 -r1.7 --- 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 16 Jun 2005 09:48:54 -0000 1.7 @@ -109,4 +109,16 @@ + + + + select tree_id + from category_tree_translations + where name = :name + and locale = :locale + + + + +