Index: openacs-4/packages/acs-content-repository/acs-content-repository.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/acs-content-repository.info,v diff -u -r1.33.2.26 -r1.33.2.27 --- openacs-4/packages/acs-content-repository/acs-content-repository.info 10 Jan 2005 01:57:07 -0000 1.33.2.26 +++ openacs-4/packages/acs-content-repository/acs-content-repository.info 14 Jan 2005 03:14:45 -0000 1.33.2.27 @@ -7,7 +7,7 @@ t t - + Dan Wickstrom The canonical repository for OpenACS content. 2005-01-09 @@ -18,7 +18,7 @@ other CMS backing functionality. Utilized by Bug Tracker, File Storage, and other packages. - + 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.33.2.5 -r1.33.2.6 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-folder.sql 12 Jan 2005 13:22:15 -0000 1.33.2.5 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-folder.sql 14 Jan 2005 03:14:45 -0000 1.33.2.6 @@ -229,13 +229,12 @@ end if; - return null; + return v_folder_id; end;' language 'plpgsql'; -- procedure delete -select define_function_args('content_folder__delete','folder_id,cascade_p;f'); - -create or replace function content_folder__delete (integer, boolean) +select define_function_args('content_folder__del','folder_id,cascade_p;f'); +create or replace function content_folder__del (integer, boolean) returns integer as ' declare delete__folder_id alias for $1; @@ -298,7 +297,19 @@ return 0; end;' language 'plpgsql'; +select define_function_args('content_folder__delete','folder_id,cascade_p;f'); +create or replace function content_folder__delete (integer, boolean) +returns integer as ' +declare + delete__folder_id alias for $1; + p_cascade_p alias for $2; +begin + PERFORM content_folder__del(delete__folder_id,p_cascade_p); + return 0; +end;' language 'plpgsql'; + + create or replace function content_folder__delete (integer) returns integer as ' declare @@ -307,7 +318,7 @@ v_parent_id integer; v_path varchar; begin - return content_folder__delete( + return content_folder__del( delete__folder_id, ''f'' ); @@ -611,6 +622,8 @@ LOOP v_parent_id := v_rec.parent_id; exit when v_parent_id = is_sub_folder__folder_id; + -- we did not find the folder, reset v_parent_id + v_parent_id := 0; end LOOP; if v_parent_id != 0 then Index: openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.1.4d4-5.1.4d5.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.1.4d4-5.1.4d5.sql,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.1.4d4-5.1.4d5.sql 6 Jan 2005 16:38:42 -0000 1.1.2.1 +++ openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.1.4d4-5.1.4d5.sql 14 Jan 2005 03:14:45 -0000 1.1.2.2 @@ -174,6 +174,7 @@ return 0; end;' language 'plpgsql'; +-- item select define_function_args('content_item__del','item_id'); create or replace function content_item__del (integer) returns integer as ' @@ -299,6 +300,7 @@ return 0; end;' language 'plpgsql'; + select define_function_args('content_item__delete','item_id'); create or replace function content_item__delete (integer) returns integer as ' @@ -308,3 +310,38 @@ PERFORM content_item__del (delete__item_id); return 0; end;' language 'plpgsql'; + + +-- template +select define_function_args('content_template__del','template_id'); +create or replace function content_template__del (integer) +returns integer as ' +declare + delete__template_id alias for $1; +begin + + delete from cr_type_template_map + where template_id = delete__template_id; + + delete from cr_item_template_map + where template_id = delete__template_id; + + delete from cr_templates + where template_id = delete__template_id; + + PERFORM content_item__delete(delete__template_id); + + return 0; +end;' language 'plpgsql'; + +select define_function_args('content_template__delete','template_id'); + +create or replace function content_template__delete (integer) +returns integer as ' +declare + delete__template_id alias for $1; +begin + PERFORM content_template__delete(delete__template_id); + + return 0; +end;' language 'plpgsql'; Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.1.5d1-5.1.5d2.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/acs-content-repository/tcl/content-folder-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/content-folder-procs.tcl,v diff -u -r1.5.2.2 -r1.5.2.3 --- openacs-4/packages/acs-content-repository/tcl/content-folder-procs.tcl 6 Jan 2005 17:48:37 -0000 1.5.2.2 +++ openacs-4/packages/acs-content-repository/tcl/content-folder-procs.tcl 14 Jan 2005 03:14:45 -0000 1.5.2.3 @@ -310,8 +310,8 @@ } { return [package_exec_plsql \ -var_list [list \ - folder_id $folder_id \ - target_folder_id $target_folder_id \ + [list folder_id $folder_id] \ + [list target_folder_id $target_folder_id] \ ] \ content_folder is_sub_folder] } Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-content-repository/tcl/test/content-folder-test-procs.tcl'. Fisheye: No comparison available. Pass `N' to diff?