Index: openacs-4/packages/file-storage/www/folder-create-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/folder-create-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/file-storage/www/folder-create-2.tcl 20 Apr 2001 20:51:10 -0000 1.1 +++ openacs-4/packages/file-storage/www/folder-create-2.tcl 25 Sep 2001 16:53:24 -0000 1.2 @@ -35,7 +35,7 @@ set folder_id [db_exec_plsql folder_create " begin - :1 := content_folder.new ( + :1 := file_storage.new_folder ( name => :name, label => :folder_name, parent_id => :parent_id, @@ -44,38 +44,21 @@ ); end;"] -# register the standard content types - -db_exec_plsql register_content " -begin - content_folder.register_content_type(:folder_id,'content_revision'); - content_folder.register_content_type(:folder_id,'content_folder'); -end;" - -# give the creator admin privileges on the folder -db_exec_plsql grant_admin_perms " -begin - acs_permission.grant_permission ( - object_id => :folder_id, - grantee_id => :user_id, - privilege => 'admin' - ); -end;" - } on_error { + # most likely a duplicate name or a double click - if [db_string duplicate_check " - select count(*) - from cr_items - where name = :name - and parent_id = :parent_id"] { - ad_return_complaint 1 "Either there is already a folder with the name \"$folder_name\" or you clicked on the button more than once. You can use the Back button to return and choose a new name, or return to the directory listing to see if your folder 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
" - } + #if [db_string duplicate_check " + #select count(*) + #from cr_items + #where name = :name + #and parent_id = :parent_id"] { + ad_return_complaint 1 "Either there is already a folder with the name \"$folder_name\" or you clicked on the button more than once. You can use the Back button to return and choose a new name, or return to the directory listing to see if your folder 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 }