Index: openacs-4/packages/file-storage/www/copy.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/copy.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/file-storage/www/copy.tcl 23 Oct 2008 13:59:02 -0000 1.9 +++ openacs-4/packages/file-storage/www/copy.tcl 27 Oct 2014 16:41:32 -0000 1.10 @@ -8,7 +8,7 @@ } -query { object_id:notnull,integer,multiple - folder_id:integer,optional + folder_id:naturalnum,optional {return_url ""} {root_folder_id ""} {redirect_to_folder:boolean 0} @@ -32,7 +32,7 @@ set copy_message "" incr allowed_count } else { - set copy_message [_ file_storage.Not_Allowed] + set copy_message [_ file-storage.Not_Allowed] incr not_allowed_count } if {$type eq "folder"} { @@ -61,7 +61,7 @@ set error_items [list] template::multirow foreach copy_objects { db_transaction { - if {![string equal $type "folder"] } { + if {$type ne "folder" } { set file_rev_id [db_exec_plsql copy_item {}] callback fs::file_revision_new -package_id $package_id -file_id $object_id -parent_id $folder_id } else { @@ -108,16 +108,16 @@ } } - if {[empty_string_p $root_folder_id]} { + if {$root_folder_id eq ""} { set root_folder_id [fs::get_root_folder] } set object_id $objects_to_copy set cancel_url "[ad_conn url]?[ad_conn query]" db_multirow -extend {copy_url} folder_tree get_folder_tree "" { - if {[lsearch [concat $not_allowed_parents $not_allowed_children] $folder_id] ne "-1" || - [lsearch $not_allowed_children $parent_id] ne "-1" } { - - if {[lsearch $not_allowed_children $parent_id] ne "-1"} { + if {$folder_id in [concat $not_allowed_parents $not_allowed_children] + || $parent_id in $not_allowed_children + } { + if {$parent_id in $not_allowed_children} { lappend not_allowed_children $folder_id } set copy_url ""