Index: openacs-4/packages/dotlrn/tcl/site-nodes-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/Attic/site-nodes-procs.tcl,v diff -u -r1.19 -r1.20 --- openacs-4/packages/dotlrn/tcl/site-nodes-procs.tcl 22 Jun 2002 20:11:03 -0000 1.19 +++ openacs-4/packages/dotlrn/tcl/site-nodes-procs.tcl 9 Jul 2002 19:42:36 -0000 1.20 @@ -224,4 +224,22 @@ return [db_string select_child_package_id {} -default 0] } + ad_proc -public child_package_exists_p { + {-parent_package_id ""} + {-package_key:required} + } { + Returns 1 if there exists a child package with the given package_key, + or 0 if not. + } { + set child_package_id [site_nodes::get_child_package_id \ + -parent_package_id $parent_package_id \ + -package_key $package_key + ] + + if {$child_package_id == 0} { + return 0 + } else { + return 1 + } + } }