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.1 -r1.2 --- openacs-4/packages/acs-bootstrap-installer/tcl/40-db-query-dispatcher-procs.tcl 18 Apr 2001 02:00:59 -0000 1.1 +++ openacs-4/packages/acs-bootstrap-installer/tcl/40-db-query-dispatcher-procs.tcl 19 Apr 2001 04:23:10 -0000 1.2 @@ -161,18 +161,24 @@ # Get the proc name being executed. set proc_name [info level [expr "-1 - $added_stack_num"]] + set list_of_source_procs {ns_sourceproc apm_source template::adp_parse} + # We check if we're running the special ns_ proc that tells us # whether this is an URL or a Tcl proc. - if {[regexp {^ns_sourceproc} $proc_name all] || \ - [regexp {^apm_source} $proc_name all]} { + if {[lsearch $list_of_source_procs [lindex $proc_name 0]] != -1} { # Means we are running inside an URL + # Check the ad_conn stuff + if {[catch {ns_log Notice "QD= the ad_conn file is [ad_conn file]"} errmsg]} {} + # 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] } 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] Index: openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 16 Apr 2001 21:59:47 -0000 1.2 +++ openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 19 Apr 2001 04:23:11 -0000 1.3 @@ -357,6 +357,9 @@ programmer, may wish to work with row numbers. } { + # Query Dispatcher (OpenACS - ben) + set full_statement_name [db_qd_get_fullname $statement_name] + ad_arg_parser { bind args } $args # Do some syntax checking. @@ -382,7 +385,7 @@ upvar \#[template::adp_level] "$var_name:rowcount" counter db_with_handle db { - set selection [db_exec select $db $statement_name $sql] + set selection [db_exec select $db $full_statement_name $sql] set counter 0 while { [db_getrow $db $selection] } { Index: openacs-4/packages/acs-tcl/tcl/apm-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 12 Apr 2001 16:58:18 -0000 1.4 +++ openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 19 Apr 2001 04:23:11 -0000 1.5 @@ -350,7 +350,7 @@ # Load up each file ns_log Notice "APM/QD = looping through files to load queries from" foreach file $files { - db_fullquery_internal_load_cache $file + db_qd_load_query_file $file } ns_log Notice "APM/QD = DONE looping through files to load queries from" }