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.63 -r1.64 --- openacs-4/packages/xotcl-core/tcl/cr-procs.tcl 9 May 2018 15:33:34 -0000 1.63 +++ openacs-4/packages/xotcl-core/tcl/cr-procs.tcl 18 May 2018 10:15:21 -0000 1.64 @@ -67,10 +67,10 @@ set $key [ns_cache eval xotcl_object_type_cache \ [expr {$item_id ? $item_id : $revision_id}] { if {$item_id} { - ::xo::dc 1row get_class_from_item_id \ + ::xo::dc 1row -prepare integer get_class_from_item_id \ "select content_type as object_type from cr_items where item_id=:item_id" } else { - ::xo::dc 1row get_class_from_revision_id \ + ::xo::dc 1row -prepare integer get_class_from_revision_id \ "select object_type from acs_objects where object_id=:revision_id" } return $object_type @@ -104,7 +104,7 @@ } { # TODO: the following line is deactivated, until we get rid of the "folder object" in xowiki #if {[:isobject ::$item_id]} {return [::$item_id parent_id]} - ::xo::dc 1row get_parent "select parent_id from cr_items where item_id = :item_id" + ::xo::dc 1row -prepare integer get_parent "select parent_id from cr_items where item_id = :item_id" return $parent_id } @@ -119,7 +119,7 @@ } { # TODO: the following line is deactivated, until we get rid of the "folder object" in xowiki #if {[:isobject ::$item_id]} {return [::$item_id parent_id]} - ::xo::dc 1row get_name "select name from cr_items where item_id = :item_id" + ::xo::dc 1row -prepare integer get_name "select name from cr_items where item_id = :item_id" return $name } @@ -133,7 +133,7 @@ @return list of item_ids } { set items [list] - foreach item_id [::xo::dc list get_child_items \ + foreach item_id [::xo::dc list -prepare integer get_child_items \ "select item_id from cr_items where parent_id = :item_id"] { lappend items $item_id {*}[my [self proc] -item_id $item_id] } @@ -983,7 +983,7 @@ #set revision_id $old_revision_id } set :modifying_user $creation_user - set :last_modified [::xo::dc get_value get_last_modified \ + set :last_modified [::xo::dc get_value -prepare integer get_last_modified \ {select last_modified from acs_objects where object_id = :revision_id}] } return $item_id Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v diff -u -r1.521 -r1.522 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 17 May 2018 14:02:52 -0000 1.521 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 18 May 2018 10:15:21 -0000 1.522 @@ -1184,27 +1184,33 @@ if {[info exists item_id]} { if {[info exists user_id]} { # tags for item and user - set tags [::xo::dc list get_tags { + set tags [::xo::dc list -prepare integer,integer,integer get_tags { SELECT distinct tag from xowiki_tags where user_id = :user_id and item_id = :item_id and package_id = :package_id }] } else { - # all tags for this item - set tags [::xo::dc list get_tags { + # + # All tags for this item + # + set tags [::xo::dc list -prepare integer,integer get_tags { SELECT distinct tag from xowiki_tags where item_id = :item_id and package_id = :package_id }] } } else { if {[info exists user_id]} { - # all tags for this user - set tags [::xo::dc list get_tags { + # + # All tags for this user + # + set tags [::xo::dc list -prepare integer,integer get_tags { SELECT distinct tag from xowiki_tags where user_id = :user_id and package_id :package_id }] } else { - # all tags for the package - set tags [::xo::dc list get_tags { + # + # All tags for the package instance + # + set tags [::xo::dc list -prepare integer get_tags { SELECT distinct tag from xowiki_tags where package_id = :package_id }] @@ -2474,7 +2480,7 @@ set description [ad_html_text_convert -from text/html -to text/plain -- $content] } if {$description eq "" && $revision_id > 0} { - set body [::xo::dc get_value get_description_from_syndication \ + set body [::xo::dc get_value -prepare integer get_description_from_syndication \ "select body from syndication where object_id = :revision_id" \ -default ""] set description [ad_html_text_convert -from text/html -to text/plain -- $body] @@ -2541,7 +2547,7 @@ Page instproc references_update {references} { #:msg $references set item_id ${:item_id} - ::xo::dc dml delete_references \ + ::xo::dc dml -prepare integer delete_references \ "delete from xowiki_references where page = :item_id" foreach ref $references { lassign $ref r link_type @@ -4162,9 +4168,10 @@ # append it to the list_of_folders. # set folder_form [$folder page_template] - set child_folders [xo::dc list get_child_folders { + set child_folders [xo::dc list -prepare integer,integer get_child_folders { select item_id from xowiki_form_instance_item_index - where parent_id = :folder_id and page_template = :folder_form + where parent_id = :folder_id + and page_template = :folder_form }] foreach f $child_folders { ::xo::db::CrClass get_instance_from_db -item_id $f Index: openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl,v diff -u -r1.355 -r1.356 --- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 17 May 2018 07:35:53 -0000 1.355 +++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 18 May 2018 10:15:21 -0000 1.356 @@ -367,7 +367,7 @@ [export_vars -base [$package_id url] {{m revisions}}]] if {$live_revision == ${:revision_id}} { # latest revision might have changed by delete_revision, so we have to fetch here - xo::dc 1row get_revision "select latest_revision from cr_items where item_id = :item_id" + xo::dc 1row -prepare integer get_revision {select latest_revision from cr_items where item_id = :item_id} if {$latest_revision eq ""} { # we are out of luck, this was the final revision, delete the item $package_id delete -name ${:name} -item_id $item_id