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.72 -r1.73 --- openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 27 May 2007 14:31:24 -0000 1.72 +++ openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 29 May 2007 15:29:15 -0000 1.73 @@ -569,12 +569,18 @@ # Exclude all parents who have been marked with having already all children mounted. array set new_node [nsv_get site_nodes "${new_url}/"] + # Check if the site_node has children in the first place + if {![exists_and_not_null new_node(has_children_p)]} { + set new_node(has_children_p) 1 + set new_node(mounted_children_p) 0 + } + if {$new_node(has_children_p) && !$new_node(mounted_children_p)} { if {[lsearch -exact $subsite_list $name] > -1} { set node_id $parent_id } else { set node_id [db_string node_id "select node_id from site_nodes where parent_id = :parent_id and name=:name" -default ""] - ns_log Notice "Loading from the database $test_url $name $parent_id" + ns_log Debug "Loading from the database $test_url $name $parent_id" } } else { set node_id "" Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -r1.94 -r1.95 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 14 May 2007 20:30:26 -0000 1.94 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 29 May 2007 15:29:15 -0000 1.95 @@ -4372,3 +4372,15 @@ } return $files } + +ad_proc -public util::string_check_urlsafe { + s1 +} { + This proc accepts a string and verifies if it is url safe. + - make sure there is no space + - make sure there is no special characters except '-' or '_' + Returns 1 if yes and 0 if not. + Meant to be used in the validation section of ad_form. +} { + return [regexp {[<>:\"|/@\#%&+\\ ]} $s1] +}