Index: openacs-4/packages/categories/tcl/categories-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/tcl/categories-procs.tcl,v diff -u -r1.18 -r1.19 --- openacs-4/packages/categories/tcl/categories-procs.tcl 27 Jan 2005 21:37:42 -0000 1.18 +++ openacs-4/packages/categories/tcl/categories-procs.tcl 7 Feb 2005 10:39:06 -0000 1.19 @@ -215,6 +215,20 @@ return $result } +ad_proc -public category::get_id { + name + {locale en_US} +} { + Gets the id of a category given a name. + + @param name the name of the category to retrieve + @param locale the locale in which the name is supplied + @return the category id or empty string it no category was found + @author Lee Denison (lee@xarg.co.uk) +} { + return [db_string get_category_id {} -default ""] +} + ad_proc -public category::reset_translation_cache { } { Reloads all category translations in the cache. @author Timo Hentschel (timo@timohentschel.de) Index: openacs-4/packages/categories/tcl/categories-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/tcl/Attic/categories-procs.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/categories/tcl/categories-procs.xql 27 Jan 2005 21:37:42 -0000 1.5 +++ openacs-4/packages/categories/tcl/categories-procs.xql 7 Feb 2005 10:39:06 -0000 1.6 @@ -1,6 +1,17 @@ + + + + select category_id + from category_translations + where name = :name + and locale = :locale + + + +