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.4 -r1.5 --- openacs-4/packages/dotlrn/tcl/site-nodes-procs.tcl 23 Jan 2002 00:15:43 -0000 1.4 +++ openacs-4/packages/dotlrn/tcl/site-nodes-procs.tcl 4 Feb 2002 20:03:38 -0000 1.5 @@ -31,14 +31,30 @@ } ad_proc -public get_parent_id { - {-node_id:required} + {-node_id ""} + {-instance_id ""} } { - get the parent_id of this node_id + get the parent_id (a node_id) of this node_id } { - return [db_string select_parent_site_node {}] + if {![empty_string_p $node_id]} { + return [db_string select_parent_by_node_id {}] + } elseif {![empty_string_p $instance_id]} { + return [db_string select_parent_by_instance_id {}] + } else { + ns_log error "site_nodes::get_parent_id Bad params!" + ad_return_complaint 1 "site_nodes::get_parent_id Bad params! Tell your admin." + } } + ad_proc -public get_parent_name { + {-instance_id ""} + } { + get the name of the parent of this instance + } { + return [db_string select_parent_name_by_id {}] + } + # site_nodes_list procs ad_proc -public get_site_nodes_list {