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.30 -r1.31 --- openacs-4/packages/categories/tcl/category-trees-procs.tcl 18 Sep 2018 18:28:55 -0000 1.30 +++ openacs-4/packages/categories/tcl/category-trees-procs.tcl 18 Sep 2018 18:50:25 -0000 1.31 @@ -27,20 +27,19 @@ } ad_proc -public get_categories { - {-tree_id:required} + {-tree_id:required} } { returns the main categories of a given tree } { - set locale [ad_conn locale] - set result [list] - set categories [db_list get_categories ""] - foreach category_id $categories { - lappend result $category_id - } - return $result - + set locale [ad_conn locale] + set result [list] + set categories [db_list get_categories ""] + foreach category_id $categories { + lappend result $category_id + } + return $result } - + ad_proc -public map { -tree_id:required -object_id:required @@ -248,7 +247,7 @@ } ad_proc -public get_id_by_object_title { - {-title} + {-title} } { Gets the id of a category_tree given an object title (object_type=category). This is highly useful as the category_tree object title will not change if you change the @@ -258,14 +257,14 @@ @param title object title of the category to retrieve @return the category_tree_id or empty string if no category was found - @author Malte Sussdorff (malte.sussdorff@cognovis.de) + @author Malte Sussdorff (malte.sussdorff@cognovis.de) } { - return [db_string get_tree_id {} -default ""] + return [db_string get_tree_id {} -default ""] } - + ad_proc -public get_mapped_trees_from_object_list { object_id_list {locale ""}} { Get the category trees mapped to a list of objects. - + @param object_id_list list of object to get the mapped category trees. @param locale language in which to get the name. [ad_conn locale] used by default. @return Tcl list of lists: tree_id tree_name subtree_category_id @@ -333,7 +332,7 @@ @param tree_id category tree to get the using packages for. @return Tcl list of lists: package_pretty_plural object_id object_name package_id instance_name read_p - @author Timo Hentschel (timo@timohentschel.de) + @author Timo Hentschel (timo@timohentschel.de) } { set user_id [ad_conn user_id] @@ -501,18 +500,18 @@ return "categories-browse?tree_ids=$object_id" } - ad_proc -public get_id { - name - {locale en_US} + ad_proc -public get_id { + name + {locale en_US} } { - Gets the id of a category tree given a name. + 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 if no category tree was found - @author Timo Hentschel (timo@timohentschel.de) + @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 if no category tree was found + @author Timo Hentschel (timo@timohentschel.de) } { - return [db_list get_category_tree_id {}] + return [db_list get_category_tree_id {}] } } @@ -525,12 +524,12 @@ {-container_id {}} {-category_counts {}} -append:boolean - -datasource + -datasource } { - get a multirow datasource for a given tree or for all trees mapped to a - given container. datasource is: + get a multirow datasource for a given tree or for all trees mapped to a + given container. datasource is: - tree_id tree_name category_id category_name level pad deprecated_p count child_sum + tree_id tree_name category_id category_name level pad deprecated_p count child_sum where: