Index: openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl,v diff -u -N -r1.25.2.4 -r1.25.2.5 --- openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 16 Dec 2002 11:36:09 -0000 1.25.2.4 +++ openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 8 Feb 2003 16:49:30 -0000 1.25.2.5 @@ -1225,20 +1225,18 @@ return "" } # Other hostnames map to subsites. - set found_node_id [db_0or1row node_id { - select node_id - from host_node_map - where host = :host - }] + set node_id [util_memoize [list rp_lookup_node_from_host $host]] - if { $found_node_id == 1 } { - db_1row root_get { - select site_node.url(:node_id) as url - from dual - } + if { ![empty_string_p $node_id] } { + set url [site_node::get_url -node_id $node_id] + return [string range $url 0 [expr [string length $url]-2]] } else { # Hack to provide a useful default return "" } } + +ad_proc -private rp_lookup_node_from_host { host } { + return [db_string node_id { *SQL* } -default ""] +}