Index: openacs-4/packages/file-storage/www/file-move-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/file-move-2.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/file-storage/www/file-move-2.tcl 19 Aug 2001 16:16:35 -0000 1.2 +++ openacs-4/packages/file-storage/www/file-move-2.tcl 30 Aug 2001 02:07:43 -0000 1.3 @@ -44,20 +44,29 @@ } on_error { # most likely a duplicate name or a double click - set filename [db_string filename " - select name from cr_items where item_id = :file_id"] + # JS: I commented out the more elaborate error reporting, since Postgres does not seem + # JS: to like quering a table that has just aborted a transaction on it. Instead, I copied + # JS: the error reporting of file-copy-2.tcl does - if [db_string duplicate_check " - select count(*) - from cr_items - where name = :filename - and parent_id = :parent_id"] { - ad_return_complaint 1 "Either there is already a file in the specified folder with the name \"$filename\" or you clicked on the button more than once. You can return to the directory listing to see if your file is there." - } else { - ad_return_complaint 1 "We got an error that we couldn't readily identify. Please let the system owner know about this. + ad_return_complaint 1 "We received an error from the database. Probably + the folder you selected already contains a file with the same name. -
$errmsg
" - } +
$errmsg
" + + #set filename [db_string filename " + #select name from cr_items where item_id = :file_id"] + + #if [db_string duplicate_check " + #select count(*) + #from cr_items + #where name = :filename + #and parent_id = :parent_id"] { + # ad_return_complaint 1 "Either there is already a file in the specified folder with the name \"$filename\" or you clicked on the button more than once. You can return to the directory listing to see if your file is there." + #} else { + #ad_return_complaint 1 "We got an error that we couldn't readily identify. Please let the system owner know about this. + + #
$errmsg
" + #} return }