Index: openacs-4/packages/acs-bootstrap-installer/tcl/40-db-query-dispatcher-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/tcl/40-db-query-dispatcher-procs.tcl,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/acs-bootstrap-installer/tcl/40-db-query-dispatcher-procs.tcl 5 May 2001 17:34:49 -0000 1.8 +++ openacs-4/packages/acs-bootstrap-installer/tcl/40-db-query-dispatcher-procs.tcl 5 May 2001 17:55:00 -0000 1.9 @@ -186,24 +186,31 @@ } # Now we do a check to see if this is a directly accessed URL or a sourced URL - if {[regexp {^ns_sourceproc} $proc_name all]} { - ns_log Notice "QD= We are in a WWW page, woohoo!" - set real_url_p 1 - set url [ns_conn url] - } elseif {[regexp {^rp_handle_tcl_request} $proc_name all]} { - ns_log Notice "QD= We are in a VUH page sourced by rp_handle_tcl_request, woohoo!" - set real_url_p 0 - regsub {\.vuh} [ad_conn file] {} url - set url [ad_make_relative_path $url] - regsub {^/?packages} $url {} url - } else { - ns_log Notice "QD= We are in a WWW page sourced by apm_source, woohoo!" - set real_url_p 0 - set url [lindex $proc_name 1] - set url [ad_make_relative_path $url] - regsub {^/?packages} $url {} url - } + switch $proc_name { + ns_sourceproc { + ns_log Notice "QD= We are in a WWW page, woohoo!" + set real_url_p 1 + set url [ns_conn url] + } + + rp_handle_tcl_request { + ns_log Notice "QD= We are in a VUH page sourced by rp_handle_tcl_request, woohoo!" + set real_url_p 0 + regsub {\.vuh} [ad_conn file] {} url + set url [ad_make_relative_path $url] + regsub {^/?packages} $url {} url + } + + default { + ns_log Notice "QD= We are in a WWW page sourced by apm_source, woohoo!" + set real_url_p 0 + set url [lindex $proc_name 1] + set url [ad_make_relative_path $url] + regsub {^/?packages} $url {} url + } + } + # Get the URL and remove the .tcl regsub {^/} $url {} url regsub {\.tcl$} $url {} url