Index: openacs-4/packages/acs-content-repository/sql/oracle/content-folder.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-folder.sql,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-content-repository/sql/oracle/content-folder.sql 17 May 2004 15:14:44 -0000 1.12 +++ openacs-4/packages/acs-content-repository/sql/oracle/content-folder.sql 1 Jun 2004 22:54:17 -0000 1.13 @@ -163,8 +163,8 @@ end del; --- renames a folder, making sure the new name is not already in use -procedure rename ( +-- edit_names a folder, making sure the new name is not already in use +procedure edit_name ( folder_id in cr_folders.folder_id%TYPE, name in cr_items.name%TYPE default null, label in cr_folders.label%TYPE default null, @@ -174,31 +174,31 @@ begin if name is not null then - content_item.rename(folder_id, name); + content_item.edit_name(folder_id, name); end if; if label is not null then update acs_objects - set title = rename.label - where object_id = rename.folder_id; + set title = edit_name.label + where object_id = edit_name.folder_id; end if; if label is not null and description is not null then update cr_folders - set cr_folders.label = content_folder.rename.label, - cr_folders.description = content_folder.rename.description - where cr_folders.folder_id = content_folder.rename.folder_id; + set cr_folders.label = content_folder.edit_name.label, + cr_folders.description = content_folder.edit_name.description + where cr_folders.folder_id = content_folder.edit_name.folder_id; elsif label is not null and description is null then update cr_folders - set cr_folders.label = content_folder.rename.label - where cr_folders.folder_id = content_folder.rename.folder_id; + set cr_folders.label = content_folder.edit_name.label + where cr_folders.folder_id = content_folder.edit_name.folder_id; end if; -end rename; +end edit_name; -- 1) make sure we are not moving the folder to an invalid location: Index: openacs-4/packages/acs-content-repository/sql/oracle/content-item.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-item.sql,v diff -u -r1.24 -r1.25 --- openacs-4/packages/acs-content-repository/sql/oracle/content-item.sql 17 May 2004 15:14:44 -0000 1.24 +++ openacs-4/packages/acs-content-repository/sql/oracle/content-item.sql 1 Jun 2004 22:54:17 -0000 1.25 @@ -619,7 +619,7 @@ end del; -procedure rename ( +procedure edit_name ( item_id in cr_items.item_id%TYPE, name in cr_items.name%TYPE ) is @@ -629,14 +629,14 @@ from cr_items where - cr_items.name = content_item.rename.name + cr_items.name = content_item.edit_name.name and parent_id = (select parent_id from cr_items where - cr_items.item_id = content_item.rename.item_id); + cr_items.item_id = content_item.edit_name.item_id); exists_id integer; begin @@ -647,12 +647,12 @@ if exists_cur%NOTFOUND then close exists_cur; update cr_items - set cr_items.name = content_item.rename.name - where cr_items.item_id = content_item.rename.item_id; + set cr_items.name = content_item.edit_name.name + where cr_items.item_id = content_item.edit_name.item_id; update acs_objects - set title = content_item.rename.name - where object_id = content_item.rename.item_id; + set title = content_item.edit_name.name + where object_id = content_item.edit_name.item_id; else close exists_cur; if exists_id <> item_id then @@ -662,7 +662,7 @@ end if; end if; -end rename; +end edit_name; function get_id ( item_path in varchar2, Index: openacs-4/packages/acs-content-repository/sql/oracle/content-test.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-test.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-content-repository/sql/oracle/content-test.sql 30 Sep 2003 12:10:01 -0000 1.4 +++ openacs-4/packages/acs-content-repository/sql/oracle/content-test.sql 1 Jun 2004 22:54:17 -0000 1.5 @@ -214,13 +214,13 @@ --dbms_output.put_line('Path for ' || item_id || ' is ' || -- content_item.get_path(item_id)); --dbms_output.put_line('Renaming puppy to kitty...'); -content_item.rename(item_id, 'kitty'); +content_item.edit_name(item_id, 'kitty'); --dbms_output.put_line('Renaming me to aunty...'); -content_folder.rename(sub_sub_folder_id, 'aunty'); +content_folder.edit_name(sub_sub_folder_id, 'aunty'); --dbms_output.put_line('Path for ' || item_id || ' is ' || -- content_item.get_path(item_id)); --dbms_output.put_line('Renaming kitty to pa -- this should work'); ---content_item.rename(item_id, 'pa'); +--content_item.edit_name(item_id, 'pa'); --dbms_output.put_line('Path for ' || item_id || ' is ' || --content_item.get_path(item_id)); Index: openacs-4/packages/acs-content-repository/sql/oracle/packages-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/packages-create.sql,v diff -u -r1.19 -r1.20 --- openacs-4/packages/acs-content-repository/sql/oracle/packages-create.sql 9 Apr 2004 14:00:11 -0000 1.19 +++ openacs-4/packages/acs-content-repository/sql/oracle/packages-create.sql 1 Jun 2004 22:54:17 -0000 1.20 @@ -434,7 +434,7 @@ item_id in cr_items.item_id%TYPE ); -procedure rename ( +procedure edit_name ( --/** Renames the item. If an item with the specified name already exists -- under this item's parent, an error is thrown -- @author Karl Goldstein @@ -1211,7 +1211,7 @@ cascade_p in char default 'f' ); -procedure rename ( +procedure edit_name ( --/** Change the name, label and/or description of the folder -- @author Karl Goldstein -- @param folder_id The id of the folder to modify Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-folder.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-folder.sql,v diff -u -r1.37 -r1.38 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-folder.sql 29 Mar 2004 20:06:19 -0000 1.37 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-folder.sql 1 Jun 2004 22:54:18 -0000 1.38 @@ -392,7 +392,7 @@ -- procedure rename -create or replace function content_folder__rename (integer,varchar,varchar,varchar) +create or replace function content_folder__edit_name (integer,varchar,varchar,varchar) returns integer as ' declare rename__folder_id alias for $1; @@ -403,7 +403,7 @@ begin if rename__name is not null and rename__name != '''' then - PERFORM content_item__rename(rename__folder_id, rename__name); + PERFORM content_item__edit_name(rename__folder_id, rename__name); end if; if rename__label is not null and rename__label != '''' then Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql,v diff -u -r1.53 -r1.54 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql 17 May 2004 15:14:44 -0000 1.53 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql 1 Jun 2004 22:54:18 -0000 1.54 @@ -1368,11 +1368,11 @@ end;' language 'plpgsql'; -create or replace function content_item__rename (integer,varchar) +create or replace function content_item__edit_name (integer,varchar) returns integer as ' declare - rename__item_id alias for $1; - rename__name alias for $2; + edit_name__item_id alias for $1; + edit_name__name alias for $2; exists_id integer; begin select @@ -1382,25 +1382,25 @@ from cr_items where - name = rename__name + name = edit_name__name and parent_id = (select parent_id from cr_items where - item_id = rename__item_id); + item_id = edit_name__item_id); if NOT FOUND then update cr_items - set name = rename__name - where item_id = rename__item_id; + set name = edit_name__name + where item_id = edit_name__item_id; update acs_objects - set title = rename__name - where object_id = rename__item_id; + set title = edit_name__name + where object_id = edit_name__item_id; else - if exists_id != rename__item_id then - raise EXCEPTION ''-20000: An item with the name % already exists in this directory.'', rename__name; + if exists_id != edit_name__item_id then + raise EXCEPTION ''-20000: An item with the name % already exists in this directory.'', edit_name__name; end if; end if; Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-test.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-test.sql,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-test.sql 29 Aug 2001 05:12:50 -0000 1.9 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-test.sql 1 Jun 2004 22:54:18 -0000 1.10 @@ -444,14 +444,14 @@ -- ); PERFORM content_test__put_line(''Renaming puppy to kitty...''); - PERFORM content_item__rename(item_id, ''kitty''); + PERFORM content_item__edit_name(item_id, ''kitty''); PERFORM content_test__put_line(''Renaming me to aunty...''); - PERFORM content_folder__rename(sub_sub_folder_id, ''aunty'',null,null); + PERFORM content_folder__edit_name(sub_sub_folder_id, ''aunty'',null,null); PERFORM content_test__put_line(''Path for '' || item_id || '' is '' || content_item__get_path(item_id,null) ); PERFORM content_test__put_line(''Renaming kitty to pa -- this should work''); - PERFORM content_item__rename(item_id, ''pa''); + PERFORM content_item__edit_name(item_id, ''pa''); PERFORM content_test__put_line(''Path for '' || item_id || '' is '' || content_item__get_path(item_id,null) ); Index: openacs-4/packages/acs-content-repository/www/doc/api/folder.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/www/doc/api/folder.html,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-content-repository/www/doc/api/folder.html 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-content-repository/www/doc/api/folder.html 1 Jun 2004 22:54:18 -0000 1.2 @@ -549,7 +549,7 @@
-
Change the name, label and/or description of the folder
Index: openacs-4/packages/acs-content-repository/www/doc/api/item.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/www/doc/api/item.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-content-repository/www/doc/api/item.html 15 Feb 2003 12:11:41 -0000 1.2 +++ openacs-4/packages/acs-content-repository/www/doc/api/item.html 1 Jun 2004 22:54:18 -0000 1.3 @@ -1127,7 +1127,7 @@
-
Renames the item. If an item with the specified name already exists
under this item's parent, an error is thrown
Index: openacs-4/packages/cms/www/modules/items/rename-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/rename-oracle.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/cms/www/modules/items/rename-oracle.xql 25 May 2001 04:56:36 -0000 1.1
+++ openacs-4/packages/cms/www/modules/items/rename-oracle.xql 1 Jun 2004 22:54:18 -0000 1.2
@@ -7,7 +7,7 @@