Index: openacs-4/packages/file-storage/file-storage.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/file-storage.info,v
diff -u -r1.38.2.15 -r1.38.2.16
--- openacs-4/packages/file-storage/file-storage.info 2 May 2006 12:04:17 -0000 1.38.2.15
+++ openacs-4/packages/file-storage/file-storage.info 5 May 2006 19:26:22 -0000 1.38.2.16
@@ -7,15 +7,15 @@
f
f
-
+
OpenACS
Collaborative document storage
2005-09-30
OpenACS
Provides a versioned document store with storage in the filesystem or database (depending on configuration). Documents and folders can be permissioned and folders downloaded.
0
-
+
@@ -40,7 +40,6 @@
-
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.5.2.4 -r1.5.2.5
--- openacs-4/packages/file-storage/www/copy.tcl 2 May 2006 12:04:17 -0000 1.5.2.4
+++ openacs-4/packages/file-storage/www/copy.tcl 5 May 2006 19:26:23 -0000 1.5.2.5
@@ -58,8 +58,7 @@
db_transaction {
if {![string equal $type "folder"] } {
set file_rev_id [db_exec_plsql copy_item {}]
- set file_id [content::revision::item_id -revision_id $file_rev_id]
- callback fs::file_revision_new -package_id $package_id -file_id $file_id -parent_id $folder_id
+ callback fs::file_revision_new -package_id $package_id -file_id $object_id -parent_id $folder_id
} else {
db_exec_plsql copy_folder {}
}
Index: openacs-4/packages/file-storage/www/move-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/move-postgresql.xql,v
diff -u -r1.4.2.2 -r1.4.2.3
--- openacs-4/packages/file-storage/www/move-postgresql.xql 2 May 2006 12:04:17 -0000 1.4.2.2
+++ openacs-4/packages/file-storage/www/move-postgresql.xql 5 May 2006 19:26:23 -0000 1.4.2.3
@@ -15,36 +15,14 @@
- select fs.object_id, fs.name, fs.type, fs.parent_id,
+ select fs.object_id, fs.name,
acs_permission__permission_p(fs.object_id, :user_id, 'write') as move_p
from fs_objects fs
where fs.object_id in ([template::util::tcl_to_sql_list $object_id])
order by move_p
-
-
- select file_storage__copy_file(
- :object_id,
- :folder_id,
- :user_id,
- :peer_addr
- )
-
-
-
-
-
- select content_folder__copy (
- :object_id,
- :folder_id,
- :user_id,
- :peer_addr
- )
-
-
-
select content_item__move(
Index: openacs-4/packages/file-storage/www/move.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/move.tcl,v
diff -u -r1.5.2.3 -r1.5.2.4
--- openacs-4/packages/file-storage/www/move.tcl 2 May 2006 12:04:17 -0000 1.5.2.3
+++ openacs-4/packages/file-storage/www/move.tcl 5 May 2006 19:26:23 -0000 1.5.2.4
@@ -20,9 +20,6 @@
set object_id_list [join $object_id ","]
set user_id [ad_conn user_id]
-set peer_addr [ad_conn peeraddr]
-set package_id [ad_conn package_id]
-set copy_and_delete_p [parameter::get -parameter MoveByCopyDeleteP -package_id $package_id -default 0]
set allowed_count 0
set not_allowed_count 0
@@ -57,29 +54,10 @@
# but the existing file-move page checks for WRITE
set error_items [list]
template::multirow foreach move_objects {
- if {$copy_and_delete_p} {
- # copy and delete file to move it
- db_transaction {
- if {![string equal $type "folder"] } {
- set file_rev_id [db_exec_plsql copy_item {}]
- set file_id [content::revision::item_id -revision_id $file_rev_id]
- callback fs::file_revision_new -package_id $package_id -file_id $file_id -parent_id $folder_id
- fs::delete_file -item_id $object_id -parent_id $parent_id
- } else {
- db_exec_plsql copy_folder {}
- fs::delete_folder -folder_id $object_id -parent_id $parent_id
- }
- db_exec_plsql move_item {}
- } on_error {
- lappend error_items $name
- }
- } else {
- # execute move command
- db_transaction {
- db_exec_plsql move_item {}
- } on_error {
- lappend error_items $name
- }
+ db_transaction {
+ db_exec_plsql move_item {}
+ } on_error {
+ lappend error_items $name
}
}
if {[llength $error_items]} {