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.20 -r1.21 --- openacs-4/packages/acs-content-repository/sql/oracle/content-folder.sql 23 Oct 2008 13:04:03 -0000 1.20 +++ openacs-4/packages/acs-content-repository/sql/oracle/content-folder.sql 24 Oct 2008 13:50:14 -0000 1.21 @@ -355,7 +355,7 @@ and f.folder_id = copy.folder_id; - if v_current_folder_id = copy__target_folder_id and v_name = copy.name then + if v_current_folder_id = copy__target_folder_id and (v_name = copy.name or copy.name is null) then raise EXCEPTION ''-20000: content_folder.copy - Destination folder is parent folder''; end if; Index: openacs-4/packages/acs-content-repository/sql/oracle/upgrade/upgrade-5.5.0d2-5.5.0d3.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/upgrade/upgrade-5.5.0d2-5.5.0d3.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-content-repository/sql/oracle/upgrade/upgrade-5.5.0d2-5.5.0d3.sql 23 Oct 2008 13:04:03 -0000 1.1 +++ openacs-4/packages/acs-content-repository/sql/oracle/upgrade/upgrade-5.5.0d2-5.5.0d3.sql 24 Oct 2008 13:50:14 -0000 1.2 @@ -275,6 +275,7 @@ -- * creates new folder in the target folder with the same attributes -- as the old one -- * copies all contents of folder to the new one +procedure copy ( folder_id in cr_folders.folder_id%TYPE, target_folder_id in cr_folders.folder_id%TYPE, creation_user in acs_objects.creation_user%TYPE, @@ -350,7 +351,7 @@ and f.folder_id = copy.folder_id; - if v_current_folder_id = copy__target_folder_id and v_name = copy.name then + if v_current_folder_id = copy__target_folder_id and (v_name = copy.name or copy.name is null) then raise EXCEPTION ''-20000: content_folder.copy - Destination folder is parent folder''; end if; 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.49 -r1.50 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-folder.sql 23 Oct 2008 13:04:03 -0000 1.49 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-folder.sql 24 Oct 2008 13:50:14 -0000 1.50 @@ -592,7 +592,7 @@ -- would be better to check if the copy__name alredy exists in the destination folder. - if v_current_folder_id = copy__target_folder_id and v_name = copy__name then + if v_current_folder_id = copy__target_folder_id and (v_name = copy__name or copy__name is null) then raise EXCEPTION ''-20000: content_folder.copy - Destination folder is parent folder and folder alredy exists''; end if; Index: openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.5.0d2-5.5.0d3.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.5.0d2-5.5.0d3.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.5.0d2-5.5.0d3.sql 23 Oct 2008 13:04:04 -0000 1.1 +++ openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.5.0d2-5.5.0d3.sql 24 Oct 2008 13:50:14 -0000 1.2 @@ -69,7 +69,7 @@ -- would be better to check if the copy__name alredy exists in the destination folder. - if v_current_folder_id = copy__target_folder_id and v_name = copy__name then + if v_current_folder_id = copy__target_folder_id and (v_name = copy__name or copy__name is null) then raise EXCEPTION ''-20000: content_folder.copy - Destination folder is parent folder and folder alredy exists''; end if;