Index: openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl,v diff -u -r1.36 -r1.37 --- openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 19 Sep 2003 10:15:32 -0000 1.36 +++ openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 22 Sep 2003 09:51:37 -0000 1.37 @@ -431,7 +431,7 @@ } { set node_url [get_url -node_id $node_id] - set child_urls [nsv_array names site_nodes "${node_url}*"] + set child_urls [nsv_array names site_nodes "${node_url}?*"] if { !$all_p } { set org_child_urls $child_urls Index: openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl 10 Sep 2003 08:09:42 -0000 1.4 +++ openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl 22 Sep 2003 09:51:37 -0000 1.5 @@ -245,3 +245,24 @@ } + +aa_register_case -cats { + script +} -on_error { + site_node::get_children returns root node! +} test_for_root_node_inclusion { + Shows bug in site_node::get_children - reurns passed node +} { + # Start with a known site-map entry + set node_id [site_node::get_node_id -url "/"] + + set child_node_ids [site_node::get_children \ + -all \ + -element node_id \ + -node_id $node_id] + + # lsearch returns '-1' if not found + aa_equals "site_node::get_children" [lsearch -exact $child_node_ids $node_id] -1 +} + +