Index: openacs-4/packages/file-storage/sql/postgresql/file-storage-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/sql/postgresql/file-storage-package-create.sql,v
diff -u -r1.19 -r1.20
--- openacs-4/packages/file-storage/sql/postgresql/file-storage-package-create.sql	26 Feb 2004 15:52:33 -0000	1.19
+++ openacs-4/packages/file-storage/sql/postgresql/file-storage-package-create.sql	17 May 2004 15:15:13 -0000	1.20
@@ -17,7 +17,6 @@
 declare
         get_root_folder__package_id  alias for $1;
         v_folder_id                  fs_root_folders.folder_id%TYPE;
-        v_count                      integer;
 begin
         select folder_id into v_folder_id 
         from fs_root_folders
@@ -646,8 +645,28 @@
         delete_folder__folder_id        alias for $1; 
 begin
 
+        return file_storage__delete_folder(
+                    delete_folder__folder_id,  -- folder_id
+                    ''f''
+                    );
+
+end;' language 'plpgsql';
+
+create or replace function file_storage__delete_folder(
+       --
+       -- Delete a folder
+       --
+       integer,          -- cr_folders.folder_id%TYPE
+       boolean
+) returns integer as '  -- 0 for success
+declare
+        delete_folder__folder_id        alias for $1; 
+        delete_folder__cascade_p        alias for $2;
+begin
+
         return content_folder__delete(
-                    delete_folder__folder_id  -- folder_id
+                    delete_folder__folder_id,  -- folder_id
+                    delete_folder__cascade_p
                     );
 
 end;' language 'plpgsql';
