Index: openacs-4/packages/edit-this-page/www/etp-trash.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/edit-this-page/www/etp-trash.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/edit-this-page/www/etp-trash.tcl 7 Aug 2014 07:39:18 -0000 1.5 +++ openacs-4/packages/edit-this-page/www/etp-trash.tcl 7 Apr 2018 09:21:04 -0000 1.6 @@ -21,14 +21,14 @@ } else { # You can't delete a site node if it has any children - if {[db_string site_node_children ""] > 0} { - ad_return_warning "Unable to delete content section" " - Sorry, this subtopic contains other subtopics. - You should remove them first; then you'll be able to - remove this one. If Edit This Page isn't showing any - subtopics, you - may need to use the Site Map. - " + if {[llength [site_node::get_children -node_id $node_id]] > 0} { + ad_return_warning "Unable to delete content section" { + Sorry, this subtopic contains other subtopics. + You should remove them first; then you'll be able to + remove this one. If Edit This Page isn't showing any + subtopics, you may need to use the + Site Map. + } ad_script_abort } } @@ -38,7 +38,8 @@ db_transaction { if {$node_id ne ""} { - site_map_unmount_application -delete_p "t" $node_id + site_node::unmount -node_id $node_id + site_node::delete -node_id $node_id } # If an item with the same name is already in the trash, Index: openacs-4/packages/edit-this-page/www/etp-trash.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/edit-this-page/www/etp-trash.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/edit-this-page/www/etp-trash.xql 30 Nov 2002 17:32:17 -0000 1.4 +++ openacs-4/packages/edit-this-page/www/etp-trash.xql 7 Apr 2018 09:21:04 -0000 1.5 @@ -1,14 +1,6 @@ - - - select count(1) - from site_nodes - where parent_id = :node_id - - - select node_id