Index: openacs-4/packages/cms/www/modules/sitemap/attributes.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/attributes.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/cms/www/modules/sitemap/attributes.tcl 8 Jun 2001 01:44:53 -0000 1.5 +++ openacs-4/packages/cms/www/modules/sitemap/attributes.tcl 19 Aug 2002 03:54:52 -0000 1.6 @@ -19,9 +19,7 @@ cms_folder::get_registered_types $folder_id multirow content_types # Get other misc values -template::query get_folder_name folder_name onevalue " - select label from cr_folders where folder_id = :folder_id -" +set folder_name [db_string get_folder_name ""] set page_title "Folder Attributes - $folder_name" set register_marked_content_types \ @@ -38,16 +36,8 @@ # Determine registered types -template::query get_options folder_options onerow " - select - content_folder.is_registered(:folder_id,'content_folder') allow_subfolders, - content_folder.is_registered(:folder_id,'content_symlink') allow_symlinks, - content_folder.is_registered(:folder_id,'content_template') allow_templates - from dual -" +db_1row get_options "" -column_array folder_options - - # Create the form for registering special types to the folder form create register_types Index: openacs-4/packages/cms/www/modules/sitemap/create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/create.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/cms/www/modules/sitemap/create.tcl 27 May 2001 00:22:34 -0000 1.3 +++ openacs-4/packages/cms/www/modules/sitemap/create.tcl 19 Aug 2002 03:54:52 -0000 1.4 @@ -16,11 +16,8 @@ content::check_access $create_parent_id cm_new -user_id [User::getID] # Get the path -template::query get_path path onevalue " - select content_item.get_path(:create_parent_id) from dual -" +set path [db_string get_path ""] - # Create the form form create add_folder Index: openacs-4/packages/cms/www/modules/sitemap/delete-items.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/delete-items.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/cms/www/modules/sitemap/delete-items.tcl 30 May 2001 22:56:27 -0000 1.4 +++ openacs-4/packages/cms/www/modules/sitemap/delete-items.tcl 19 Aug 2002 03:54:52 -0000 1.5 @@ -19,32 +19,9 @@ # get title, content_type, path, item_id of each marked item -template::query get_marked_items marked_items multirow " - select - item_id, - nvl(content_item.get_title(item_id),name) title, - content_item.get_path(item_id) path, - pretty_name as content_type_pretty, - content_symlink.is_symlink(item_id) is_symlink, - content_folder.is_folder(item_id) is_folder, - content_template.is_template(item_id) is_template - from - cr_items i, acs_object_types t - where - i.content_type = t.object_type - and - item_id in ([join $clip_items ","]) - and - -- permissions check - cms_permission.permission_p( item_id, :user_id, 'cm_write' ) = 't' - order by - -- this way parents are deleted after their children - item_id desc -" +db_multirow marked_items get_marked_items "" - - form create delete element create delete deleted_items \ @@ -97,16 +74,8 @@ # get all the parent_id's of the items being deleted # because we need to flush the paginator cache for each of # these folders - template::query get_list flush_list onelist " - select - parent_id - from - cr_resolved_items - where - resolved_id = :del_item_id - " + set flush_list [db_list get_flush_list ""] - # set up the call to the proper PL/SQL delete procedure if { [string equal $is_symlink "t"] } { set delete_proc [db_map symlink_delete] Index: openacs-4/packages/cms/www/modules/sitemap/delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/delete.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/cms/www/modules/sitemap/delete.tcl 25 May 2001 02:15:56 -0000 1.2 +++ openacs-4/packages/cms/www/modules/sitemap/delete.tcl 19 Aug 2002 03:54:52 -0000 1.3 @@ -12,9 +12,7 @@ content::check_access $id cm_write -user_id [User::getID] # Determine if the folder is empty -template::query check_empty is_empty onevalue " - select content_folder.is_empty(:id) from dual -" +set is_empty [db_string check_empty ""] # If nonempty, show error if { [string equal $is_empty "f"] } { Index: openacs-4/packages/cms/www/modules/sitemap/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/index.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/cms/www/modules/sitemap/index.tcl 8 Jun 2001 01:44:53 -0000 1.4 +++ openacs-4/packages/cms/www/modules/sitemap/index.tcl 19 Aug 2002 03:54:52 -0000 1.5 @@ -26,9 +26,7 @@ set parent_var :root_id - template::query get_module_name module_name onevalue " - select name from cm_modules where key = :mount_point - " + set module_name [db_string get_module_name ""] set info(label) $module_name set info(description) "" @@ -37,14 +35,7 @@ # get all the content types registered to this folder # check whether this folder allows subfolders, symlinks, and templates - template::query get_reg_types registered_types onelist " - select - content_type - from - cr_folder_type_map - where - folder_id = :root_id - " + set registered_types [db_list get_reg_types ""] set subfolders_allowed f set symlinks_allowed f @@ -66,9 +57,7 @@ set parent_var :id # Resolve the symlink, if any - template::query get_resolved_id resolved_id onevalue " - select content_symlink.resolve( :id ) from dual - " + set_resolved_id [db_string get_resolved_id ""] if { $resolved_id != $id } { set is_symlink t @@ -79,16 +68,7 @@ set what "Folder" } - template::query get_info info onerow " - select - parent_id, NVL(label, name) label, description - from - cr_items i, cr_folders f - where - i.item_id = f.folder_id - and - f.folder_id = :id - " + db_1row get_info "" -column_array info # Determine the parent id if none exists set parent_id $info(parent_id) @@ -99,14 +79,7 @@ # get all the content types registered to this folder # check whether this folder allows subfolders, symlinks, and templates - template::query get_types registered_types onelist " - select - content_type - from - cr_folder_type_map - where - folder_id = :id - " + set_registered_types [db_list get_types ""] set subfolders_allowed f set symlinks_allowed f @@ -155,9 +128,7 @@ # Get the index page ID -template::query get_index_page_id index_page_id onevalue " - select content_folder.get_index_page($parent_var) from dual -" +set index_page_id [db_string get_index_page_id ""] # sort table by columns switch -exact -- $orderby { @@ -234,19 +205,8 @@ # symlinks to this folder/item -template::query get_symlinks symlinks multirow " - select - i.item_id id, - content_item.get_path(i.item_id) path - from - cr_items i, cr_symlinks s - where - i.item_id = s.target_id - and - i.item_id = :original_id -" +db_multirow symlinks get_symlinks "" - form create add_item if { [template::util::is_nil id] } { Index: openacs-4/packages/cms/www/modules/sitemap/move.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/move.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/cms/www/modules/sitemap/move.tcl 30 Aug 2001 03:40:01 -0000 1.4 +++ openacs-4/packages/cms/www/modules/sitemap/move.tcl 19 Aug 2002 03:54:52 -0000 1.5 @@ -27,31 +27,13 @@ set no_items_on_clipboard "f" } -template::query get_path path onevalue " - select - content_item.get_path( :folder_id ) - from - dual -" +set path [db_string get_path ""] ns_log Notice "path = $path" # get relevant marked items -template::query get_marked marked_items multirow " - select - content_item.get_title(item_id) title, - content_item.get_path(item_id,:root_id) name, - item_id, parent_id - from - cr_items - where - item_id in ([join $clip_items ","]) - and - -- only for those items which user has cm_write - cms_permission.permission_p(item_id, :user_id, 'cm_write') = 't' -" +db_multirow marked_items get_marked "" - form create move element create move mount_point \ -datatype keyword \ Index: openacs-4/packages/cms/www/modules/sitemap/rename.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/rename.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/cms/www/modules/sitemap/rename.tcl 24 May 2001 23:57:17 -0000 1.2 +++ openacs-4/packages/cms/www/modules/sitemap/rename.tcl 19 Aug 2002 03:54:52 -0000 1.3 @@ -40,15 +40,7 @@ set item_id [element get_value rename_folder item_id] # Get existing folder parameters - template::query get_info info onerow " - select - i.name, f.label, f.description - from - cr_items i, cr_folders f - where - i.item_id = :item_id - and - f.folder_id = :item_id" + db_1row get_info "" -column_array info element set_properties rename_folder name -value $info(name) element set_properties rename_folder label -value $info(label) Index: openacs-4/packages/cms/www/modules/sitemap/symlink.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/symlink.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/cms/www/modules/sitemap/symlink.tcl 30 Aug 2001 04:15:21 -0000 1.5 +++ openacs-4/packages/cms/www/modules/sitemap/symlink.tcl 19 Aug 2002 03:54:52 -0000 1.6 @@ -30,21 +30,7 @@ } # get title, name, item_id of each marked item -template::query get_marked marked_items multirow " - select - content_item.get_title(item_id) title, 'symlink_to_' || name as name, - item_id - from - cr_items - where - item_id in ([join $clip_items ","]) - and - -- only items which have are not symlinks - content_type ^= 'content_symlink' - and - -- only for those item which user has cm_examine - cms_permission.permission_p(item_id, :user_id, 'cm_examine') = 't' -" +db_multirow marked_items get_marked "" form create symlink Index: openacs-4/packages/cms/www/modules/templates/assets.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/cms/www/modules/templates/assets.tcl 24 May 2001 23:57:17 -0000 1.2 +++ openacs-4/packages/cms/www/modules/templates/assets.tcl 19 Aug 2002 03:54:52 -0000 1.3 @@ -73,10 +73,7 @@ if { [template::util::is_nil width] || \ [template::util::is_nil height] } { set revision_id [item::get_best_revision $item_id] - template::query get_image_info image_info onerow " - select width, height from images - where image_id = :revision_id - " -cache "image_width_height $revision_id" + db_1row get_image_info "" -column_array image_info if { [template::util::is_nil width] } { set width $image_info(width) Index: openacs-4/packages/cms/www/modules/templates/clipboard.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/clipboard.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/cms/www/modules/templates/clipboard.tcl 8 Jun 2001 01:44:53 -0000 1.2 +++ openacs-4/packages/cms/www/modules/templates/clipboard.tcl 19 Aug 2002 03:54:52 -0000 1.3 @@ -8,12 +8,7 @@ if { $template_count > 0 } { - template::query get_templates templates multirow "select - template_id, content_item.get_path(template_id) path - from - cr_templates - where - template_id in ($in_list)" + db_multirow templates get_templates "" } set return_url [ns_set iget [ns_conn headers] Referer] Index: openacs-4/packages/cms/www/modules/templates/copy.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/copy.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/cms/www/modules/templates/copy.tcl 26 May 2001 19:45:03 -0000 1.3 +++ openacs-4/packages/cms/www/modules/templates/copy.tcl 19 Aug 2002 03:54:52 -0000 1.4 @@ -30,4 +30,4 @@ template::forward [ns_queryget return_url] } -template::query get_path path onevalue "select content_item.get_path(:folder_id) from dual" +set path [db_string get_path ""]