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.4 -r1.5 --- openacs-4/packages/cms/www/modules/sitemap/delete.tcl 30 Sep 2003 12:10:06 -0000 1.4 +++ openacs-4/packages/cms/www/modules/sitemap/delete.tcl 16 Nov 2004 22:32:50 -0000 1.5 @@ -2,14 +2,14 @@ # Delete any symlinks pointing to this folder (possibly give a warning). template::request create -template::request set_param id -datatype keyword +template::request set_param item_id -datatype keyword template::request set_param parent_id -datatype keyword -optional request set_param mount_point -datatype keyword -optional -value sitemap # permission check - user must have cm_write on this folder to delete it -content::check_access $id cm_write -user_id [User::getID] +content::check_access $item_id cm_write -user_id [auth::require_login] # Determine if the folder is empty set is_empty [db_string check_empty ""] @@ -19,24 +19,24 @@ set message "This folder is not empty." set return_url "modules/sitemap/index" - set passthrough [list [list id $id] [list parent_id $parent_id]] + set passthrough [list [list item_id $item_id] [list parent_id $parent_id]] template::forward "../../error?message=$message&return_url=$return_url&passthrough=$passthrough" } else { # Otherwise, delete the folder db_transaction { - db_exec_plsql delete_folder "begin content_folder.del(:id); end;" + db_exec_plsql delete_folder "" } # Remove it from the clipboard, if it exists set clip [clipboard::parse_cookie] - clipboard::remove_item $clip $mount_point $id + clipboard::remove_item $clip $mount_point $item_id clipboard::set_cookie $clip clipboard::free $clip # Flush paginator cache - cms_folder::flush $mount_point $parent_id + #cms_folder::flush $mount_point $parent_id template::forward "refresh-tree?id=$parent_id&goto_id=$parent_id&mount_point=$mount_point" }