Index: openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl,v diff -u -r1.85 -r1.86 --- openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl 5 Nov 2009 12:06:03 -0000 1.85 +++ openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl 26 Nov 2009 12:02:16 -0000 1.86 @@ -192,7 +192,7 @@ } if {[info exists check_function]} { set check_function [string toupper $check_function] - set function_exists [db_string query_version { + set function_exists [db_string [my qn query_version] { select 1 from acs_function_args where function = :check_function limit 1 } -default 0] Index: openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl,v diff -u -r1.22 -r1.23 --- openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl 6 Nov 2009 12:18:56 -0000 1.22 +++ openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl 26 Nov 2009 12:02:16 -0000 1.23 @@ -31,7 +31,7 @@ and ppm.party_id = :party_id and ppm.privilege = :privilege } -limit 1] - db_string get_package_id $sql + db_string [my qn get_package_id] $sql } else { ::xo::parameter get_package_id_from_package_key -package_key $package_key } Index: openacs-4/packages/xotcl-core/tcl/06-param-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/06-param-procs.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/xotcl-core/tcl/06-param-procs.tcl 8 Apr 2009 11:04:56 -0000 1.12 +++ openacs-4/packages/xotcl-core/tcl/06-param-procs.tcl 26 Nov 2009 12:02:16 -0000 1.13 @@ -156,15 +156,17 @@ -package_id:required } { return [ns_cache eval xotcl_object_type_cache package_key-$package_id { - db_string get_package_key "select package_key from apm_packages where package_id = $package_id" + db_string [my qn get_package_key] \ + "select package_key from apm_packages where package_id = $package_id" }] } parameter proc get_package_id_from_package_key { -package_key:required } { return [ns_cache eval xotcl_object_type_cache package_id-$package_key { - db_string get_package_id [::xo::db::sql select -vars package_id -from apm_packages \ - -where "package_key = :package_key" -limit 1] + db_string [my qn get_package_id] \ + [::xo::db::sql select -vars package_id -from apm_packages \ + -where "package_key = :package_key" -limit 1] }] } @@ -353,7 +355,7 @@ parameter proc initialize_parameters {} { # Get those parameter values, which are different from the default and # remember theses per package_id. - db_foreach get_non_default_values { + db_foreach [my qn get_non_default_values] { select p.parameter_id, p.package_key, v.package_id, p.parameter_name, p.default_value, v.attr_value from apm_parameters p, apm_parameter_values v Index: openacs-4/packages/xotcl-core/tcl/chat-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/Attic/chat-procs.tcl,v diff -u -r1.17 -r1.18 --- openacs-4/packages/xotcl-core/tcl/chat-procs.tcl 28 Aug 2008 19:23:39 -0000 1.17 +++ openacs-4/packages/xotcl-core/tcl/chat-procs.tcl 26 Nov 2009 12:02:16 -0000 1.18 @@ -307,7 +307,7 @@ ChatClass method initialize_nsvs {} { # read the last_activity information at server start into a nsv array - db_foreach get_rooms { + db_foreach [my qn get_rooms] { select room_id, to_char(max(creation_date),'HH24:MI:SS YYYY-MM-DD') as last_activity from chat_msgs group by room_id} { ::xo::clusterwide nsv_set [self]-$room_id-seen last [clock scan $last_activity] Index: openacs-4/packages/xotcl-core/tcl/cr-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/cr-procs.tcl,v diff -u -r1.36 -r1.37 --- openacs-4/packages/xotcl-core/tcl/cr-procs.tcl 26 Nov 2009 10:57:26 -0000 1.36 +++ openacs-4/packages/xotcl-core/tcl/cr-procs.tcl 26 Nov 2009 12:02:16 -0000 1.37 @@ -105,7 +105,7 @@ if {[my isobject ::$item_id]} { return [::$item_id parent_id] } - db_1row "get_parent" "select parent_id from cr_items where item_id = :item_id" + db_1row [my qn "get_parent"] "select parent_id from cr_items where item_id = :item_id" return $parent_id } @@ -121,7 +121,7 @@ if {[my isobject ::$item_id]} { return [::$item_id parent_id] } - db_1row "get_name" "select name from cr_items where item_id = :item_id" + db_1row [my qn "get_name"] "select name from cr_items where item_id = :item_id" return $name } @@ -135,7 +135,7 @@ @return list of item_ids } { set items [list] - foreach item_id [db_list "get_child_items" \ + foreach item_id [db_list [my qn "get_child_items"] \ "select item_id from cr_items where parent_id = :item_id"] { eval lappend items $item_id [my [self proc] -item_id $item_id] } Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.161 -r1.162 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 24 Nov 2009 14:08:36 -0000 1.161 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 26 Nov 2009 12:02:52 -0000 1.162 @@ -906,7 +906,7 @@ -extend_slot validator party_id_check party_id instproc check=party_id_check {value} { if {$value eq ""} {return 1} - return [db_0or1row dbq..check_party "select 1 from parties where party_id = :value"] + return [db_0or1row [my qn check_party] "select 1 from parties where party_id = :value"] } ########################################################### @@ -1679,7 +1679,7 @@ set package_id [[my object] package_id] set options [list] - db_foreach instance_select \ + db_foreach [my qn instance_select] \ [$type instance_select_query \ -folder_id [$package_id folder_id] \ -with_subtypes $with_subtypes \ Index: openacs-4/packages/xowiki/tcl/syndicate-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/syndicate-procs.tcl,v diff -u -r1.31 -r1.32 --- openacs-4/packages/xowiki/tcl/syndicate-procs.tcl 30 Oct 2008 22:54:59 -0000 1.31 +++ openacs-4/packages/xowiki/tcl/syndicate-procs.tcl 26 Nov 2009 12:02:52 -0000 1.32 @@ -185,7 +185,7 @@ # } set content [my head] - db_foreach get_pages $sql { + db_foreach [my qn get_pages] $sql { if {[string match "::*" $name]} continue if {$content_type eq "::xowiki::PageTemplate"} continue append content $rss_xml_frag @@ -263,7 +263,7 @@ -orderby "p.pub_date asc" \ -limit [my limit]] - db_foreach get_pages $sql { + db_foreach [my qn get_pages] $sql { if {$content_type ne "::xowiki::PodcastItem"} continue if {$title eq ""} {set title $name} set link [::$package_id pretty_link -download true -absolute true -siteurl $siteurl $name] @@ -313,7 +313,7 @@ $where_clause" \ -orderby "revision_id desc" \ -limit $limit] - db_foreach get_pages $sql { + db_foreach [my qn get_pages] $sql { set publish_date [::xo::db::tcl_date $publish_date tz] set creation_date [::xo::db::tcl_date $creation_date tz] set clock [clock scan $publish_date] Index: openacs-4/packages/xowiki/tcl/weblog-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/weblog-procs.tcl,v diff -u -r1.44 -r1.45 --- openacs-4/packages/xowiki/tcl/weblog-procs.tcl 22 Nov 2009 22:50:46 -0000 1.44 +++ openacs-4/packages/xowiki/tcl/weblog-procs.tcl 26 Nov 2009 12:02:52 -0000 1.45 @@ -184,7 +184,7 @@ lappend sql -page_number $page_number -page_size $page_size } - set nr_items [db_string count [eval $base_type instance_select_query $sql -count true]] + set nr_items [db_string [my qn count] [eval $base_type instance_select_query $sql -count true]] #my msg count=$nr_items #my msg sql=$sql set s [$base_type instantiate_objects -sql [eval $base_type instance_select_query $sql]] Index: openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl,v diff -u -r1.119 -r1.120 --- openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 26 Nov 2009 11:16:44 -0000 1.119 +++ openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 26 Nov 2009 12:02:52 -0000 1.120 @@ -466,7 +466,7 @@ $data set upload_file $upload_file $data set import_file [$data form_parameter upload_file.tmpfile] set mime_type [$data form_parameter upload_file.content-type] - if {[db_0or1row check_mimetype {select 1 from cr_mime_types + if {[db_0or1row [my qn check_mimetype] {select 1 from cr_mime_types where mime_type = :mime_type}] == 0 || $mime_type eq "application/octet-stream"} { set guessed_mime_type [::xowiki::guesstype $upload_file] #my msg guess=$guessed_mime_type