Index: openacs-4/packages/file-storage/sql/postgresql/file-storage-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/sql/postgresql/file-storage-create.sql,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/file-storage/sql/postgresql/file-storage-create.sql	18 Dec 2001 20:55:08 -0000	1.9
+++ openacs-4/packages/file-storage/sql/postgresql/file-storage-create.sql	21 Feb 2002 20:06:27 -0000	1.10
@@ -97,25 +97,45 @@
        -- A hackish function to get around the fact that we can not run
        -- code automatically when a new package instance is created.
        --
-       integer		-- apm_packages.package_id%TYPE
+       integer,         -- apm_packages.package_id%TYPE
+       varchar,         -- cr_folders.label%TYPE
+       varchar          -- cr_folders.description%TYPE
 )
 returns integer as '	--  fs_root_folders.folder_id%TYPE
 declare
-	new_root_folder__package_id  alias for $1;
-        v_folder_id		    fs_root_folders.folder_id%TYPE;
-        v_package_name		    apm_packages.instance_name%TYPE;
-        v_package_key		    apm_packages.package_key%TYPE;
+	new_root_folder__package_id         alias for $1;
+        new_root_folder__folder_name        alias for $2;
+        new_root_folder__description        alias for $3;
+        v_folder_id		            fs_root_folders.folder_id%TYPE;
+        v_package_name		            apm_packages.instance_name%TYPE;
+        v_package_key		            apm_packages.package_key%TYPE;
+        v_folder_name                       cr_folders.label%TYPE;
+        v_description                       cr_folders.description%TYPE;
 begin
 
         select instance_name, package_key 
         into v_package_name, v_package_key
         from apm_packages
         where package_id = new_root_folder__package_id;
 
+        if new_root_folder__folder_name is null
+        then
+            v_folder_name := v_package_name || '' Root Folder '';
+        else
+            v_folder_name := new_root_folder__folder_name;
+        end if;
+
+        if new_root_folder__description is null
+        then
+            v_description := ''Root folder for the file-storage system.  All other folders in file storage are subfolders of this one.'';
+        else
+            v_description := new_root_folder__description;
+        end if;
+
         v_folder_id := content_folder__new (
             v_package_key || ''_'' || new_root_folder__package_id, -- name
-            v_package_name || '' Root Folder'',    -- label
-            ''Root folder for the file-storage system.  All other folders in file storage are subfolders of this one.'', -- description
+            v_folder_name, -- label
+            v_description, -- description
 	    null				  -- parent_id (default)
         );
 
