Index: openacs-4/packages/categories/tcl/category-relation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/tcl/category-relation-procs.tcl,v diff -u -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/categories/tcl/category-relation-procs.tcl 23 Aug 2005 15:49:50 -0000 1.1.2.2 +++ openacs-4/packages/categories/tcl/category-relation-procs.tcl 24 Aug 2005 09:58:07 -0000 1.1.2.3 @@ -18,8 +18,8 @@ and category_id_two. This relation is also related to the user_id. @option user_id user that will be related to the meta category. - @option catefory_id_one one of the two category_id's to be related. - @option catefory_id_two the other category_id to be related. + @option category_id_one one of the two category_id's to be related. + @option category_id_two the other category_id to be related. @author Miguel Marin (miguelmarin@viaro.net) @author Viaro Networks www.viaro.net } { @@ -75,4 +75,21 @@ append element_two "\} \} \}" return "$element_one $element_two" -} \ No newline at end of file +} + +ad_proc -public category::relation::get_meta_categories { + -rel_id:required +} { + return cached list of category_one and category_two of the meta-category +} { + return [util_memoize [list category::relation::get_meta_category_internal -rel_id $rel_id]] +} + +ad_proc -private category::relation::get_meta_category_internal { + -rel_id:required +} { + get list of category_one and category_two of the meta-category +} { + db_1row get_categories {} + return [list $object_id_one $object_id_two] +} Index: openacs-4/packages/categories/tcl/category-relation-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/tcl/category-relation-procs.xql,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/categories/tcl/category-relation-procs.xql 26 Jul 2005 22:56:19 -0000 1.1.2.1 +++ openacs-4/packages/categories/tcl/category-relation-procs.xql 24 Aug 2005 09:58:07 -0000 1.1.2.2 @@ -27,5 +27,14 @@ + + + select object_id_one, object_id_two + from acs_rels + where rel_id = :rel_id + and rel_type = 'meta_category_rel' + + + \ No newline at end of file