Index: openacs-4/packages/acs-content-repository/tcl/keyword-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/Attic/keyword-procs-oracle.xql,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/acs-content-repository/tcl/keyword-procs-oracle.xql 5 Mar 2003 14:50:21 -0000 1.1.2.1 +++ openacs-4/packages/acs-content-repository/tcl/keyword-procs-oracle.xql 4 Jul 2003 15:23:36 -0000 1.1.2.2 @@ -20,6 +20,14 @@ + + + begin + content_keyword.delete(:keyword_id); + end; + + + begin Index: openacs-4/packages/acs-content-repository/tcl/keyword-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/Attic/keyword-procs-postgresql.xql,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/acs-content-repository/tcl/keyword-procs-postgresql.xql 5 Mar 2003 14:50:21 -0000 1.1.2.1 +++ openacs-4/packages/acs-content-repository/tcl/keyword-procs-postgresql.xql 4 Jul 2003 15:23:36 -0000 1.1.2.2 @@ -17,6 +17,12 @@ + + + select content_keyword__delete (:keyword_id) + + + select content_keyword__set_heading(:keyword_id, :heading) Index: openacs-4/packages/acs-content-repository/tcl/keyword-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/Attic/keyword-procs.tcl,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/acs-content-repository/tcl/keyword-procs.tcl 5 Mar 2003 14:50:21 -0000 1.1.2.1 +++ openacs-4/packages/acs-content-repository/tcl/keyword-procs.tcl 4 Jul 2003 15:23:36 -0000 1.1.2.2 @@ -27,6 +27,16 @@ return $keyword_id } +ad_proc -public cr::keyword::delete { + {-keyword_id:required} +} { + Delete a keyword. + + @author Peter Marklund +} { + db_exec_plsql delete_keyword {} +} + ad_proc -public cr::keyword::set_heading { {-keyword_id:required} {-heading:required} @@ -113,4 +123,26 @@ return $keyword_list } +ad_proc -public cr::keyword::get_options_flat { + {-parent_id ""} +} { + Returns a flat options list of the keywords with the given parent_id. +} { + return [db_list_of_lists select_keyword_options {}] +} +ad_proc -public cr::keyword::get_children { + {-parent_id ""} +} { + Returns the ids of the keywords having the given parent_id. Returns + an empty list if there are no children. + + @author Peter Marklund +} { + return [db_list select_child_keywords { + select keyword_id + from cr_keywords + where parent_id = :parent_id + }] +} + Index: openacs-4/packages/acs-content-repository/tcl/keyword-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/Attic/keyword-procs.xql,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/acs-content-repository/tcl/keyword-procs.xql 5 Mar 2003 14:50:21 -0000 1.1.2.1 +++ openacs-4/packages/acs-content-repository/tcl/keyword-procs.xql 4 Jul 2003 15:23:36 -0000 1.1.2.2 @@ -46,5 +46,15 @@ + + + select heading, + keyword_id + from cr_keywords + where [ad_decode $parent_id "" "parent_id is null" "parent_id = :parent_id"] + order by lower(heading) + + +