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 -N -r1.141.2.41 -r1.141.2.42 --- openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 8 Mar 2022 08:54:28 -0000 1.141.2.41 +++ openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 15 Oct 2022 17:02:57 -0000 1.141.2.42 @@ -105,6 +105,15 @@ apm_package_instance_delete $package_id } # ...then the node itself + # + # TODO: The names of the function in the database should be + # aligned. + # + if {[db_driverkey ""] eq "oracle"} { + acs::dc call site_node del -node_id $node_id + } else { + acs::dc call site_node delete -node_id $node_id + } acs::dc call site_node delete -node_id $node_id update_cache -node_id $node_id -url $url -object_id $package_id } @@ -609,7 +618,7 @@ WITH RECURSIVE site_node_tree(node_id, parent_id) AS ( select node_id, parent_id from site_nodes where node_id = :node_id UNION ALL - select child.node_id, child.parent_id from site_node_tree, site_nodes as child + select child.node_id, child.parent_id from site_node_tree, site_nodes child where child.parent_id = site_node_tree.node_id ) select [acs::dc map_function_name site_node__url(node_id)] from site_node_tree where node_id != :node_id @@ -1003,7 +1012,7 @@ WITH RECURSIVE site_node_tree(node_id,parent_id,object_id) AS ( select node_id, parent_id, object_id from site_nodes where node_id = :node_id UNION ALL - select child.node_id, child.parent_id, child.object_id from site_node_tree, site_nodes as child + select child.node_id, child.parent_id, child.object_id from site_node_tree, site_nodes child where child.parent_id = site_node_tree.node_id and :with_subtree ) Index: openacs-4/packages/acs-subsite/tcl/package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/package-procs.tcl,v diff -u -N -r1.40.2.9 -r1.40.2.10 --- openacs-4/packages/acs-subsite/tcl/package-procs.tcl 28 Dec 2021 14:54:56 -0000 1.40.2.9 +++ openacs-4/packages/acs-subsite/tcl/package-procs.tcl 15 Oct 2022 17:07:45 -0000 1.40.2.10 @@ -18,7 +18,7 @@ } { return [db_0or1row object_type_dynamic_p { select 1 from acs_object_types - where dynamic_p and object_type = :object_type + where dynamic_p = 't' and object_type = :object_type }] } Index: openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl,v diff -u -N -r1.68.2.23 -r1.68.2.24 --- openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 29 Aug 2022 14:17:24 -0000 1.68.2.23 +++ openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 15 Oct 2022 17:07:46 -0000 1.68.2.24 @@ -1103,7 +1103,7 @@ return [db_list_of_lists package_types { select pretty_name, package_key from apm_package_types t - where not (singleton_p and exists (select 1 from apm_packages + where not (singleton_p = 't' and exists (select 1 from apm_packages where package_key = t.package_key)) and implements_subsite_p = 'f' and package_type = 'apm_application' @@ -1250,7 +1250,7 @@ set mapped_vhost [db_list get_vhost { select host from host_node_map where node_id = :node_id - order by host = :search_vhost desc + order by case when host = :search_vhost then 2 else 1 end desc fetch first 1 row only }]