Index: openacs-4/packages/acs-subsite/tcl/subsite-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/subsite-procs-oracle.xql,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/acs-subsite/tcl/subsite-procs-oracle.xql 28 Nov 2018 16:31:02 -0000 1.12
+++ openacs-4/packages/acs-subsite/tcl/subsite-procs-oracle.xql 28 Nov 2018 17:01:01 -0000 1.13
@@ -31,13 +31,6 @@
-
-
- and rownum < 2
- order by decode(host, :search_vhost, 1, 0) desc
-
-
-
and rownum < 2
Index: openacs-4/packages/acs-subsite/tcl/subsite-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/subsite-procs-postgresql.xql,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/acs-subsite/tcl/subsite-procs-postgresql.xql 28 Nov 2018 16:31:02 -0000 1.14
+++ openacs-4/packages/acs-subsite/tcl/subsite-procs-postgresql.xql 28 Nov 2018 17:01:01 -0000 1.15
@@ -33,14 +33,6 @@
-
-
- order by case when host = :search_vhost then 1
- else 0 end desc
- limit 1
-
-
-
limit 1
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 -r1.64 -r1.65
--- openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 28 Nov 2018 16:47:38 -0000 1.64
+++ openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 28 Nov 2018 17:01:01 -0000 1.65
@@ -1252,11 +1252,12 @@
set root_p [expr {$subsite_node(parent_id) eq ""}]
set search_vhost $host
- set where_clause [db_map orderby]
-
# TODO: This should be cached
- set site_node $subsite_node(node_id)
- set mapped_vhost [db_string get_vhost {} -default ""]
+ set mapped_vhost [lindex [db_list get_vhost {
+ select host from host_node_map
+ where node_id = :node_id
+ order by host = :search_vhost desc
+ }] 0]
if {$root_p && $mapped_vhost eq ""} {
if {$strict_p} {
Index: openacs-4/packages/acs-subsite/tcl/subsite-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/Attic/subsite-procs.xql,v
diff -u -r1.16 -r1.17
--- openacs-4/packages/acs-subsite/tcl/subsite-procs.xql 28 Nov 2018 16:47:38 -0000 1.16
+++ openacs-4/packages/acs-subsite/tcl/subsite-procs.xql 28 Nov 2018 17:01:01 -0000 1.17
@@ -1,17 +1,6 @@
-
-
-
- select host
- from host_node_map
- where node_id = :node_id
- $where_clause
-
-
-
-
and host = :search_vhost