Index: openacs-4/packages/file-storage/www/folder-create-2-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/folder-create-2-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/file-storage/www/folder-create-2-oracle.xql 13 Aug 2001 03:10:44 -0000 1.1 +++ openacs-4/packages/file-storage/www/folder-create-2-oracle.xql 25 Sep 2001 16:52:55 -0000 1.2 @@ -7,9 +7,9 @@ begin - :1 := content_folder.new ( + :1 := file_storage.new_folder ( name => :name, - label => :folder_name, + folder_name => :folder_name, parent_id => :parent_id, creation_user => :user_id, creation_ip => :creation_ip @@ -18,30 +18,4 @@ - - - - -begin - content_folder.register_content_type(:folder_id,'content_revision'); - content_folder.register_content_type(:folder_id,'content_folder'); -end; - - - - - - - -begin - acs_permission.grant_permission ( - object_id => :folder_id, - grantee_id => :user_id, - privilege => 'admin' - ); -end; - - - - Index: openacs-4/packages/file-storage/www/folder-create-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/folder-create-2-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/file-storage/www/folder-create-2-postgresql.xql 14 Aug 2001 03:18:34 -0000 1.2 +++ openacs-4/packages/file-storage/www/folder-create-2-postgresql.xql 25 Sep 2001 16:53:13 -0000 1.3 @@ -6,58 +6,16 @@ - select content_folder__new ( + select file_storage__new_folder ( :name, -- name :folder_name, -- label - null, -- description :parent_id, -- parent_id - null, -- context_id (default) - null, -- folder_id (default) - now(), -- creation_date :user_id, -- creation_user :creation_ip -- creation_ip ); - - - - - begin - - PERFORM content_folder__register_content_type( - :folder_id, -- folder_id - 'content_revision', -- content_type - 'f' -- include_subtypes (default) - ); - - PERFORM content_folder__register_content_type( - :folder_id, -- folder_id - 'content_folder', -- content_type - 'f' -- include_subtypes (default) - ); - - return 0; - - end; - - - - - - - - select acs_permission__grant_permission ( - :folder_id, -- object_id - :user_id, -- grantee_id - 'admin' -- privilege - ); - - - - - 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 }