Index: openacs-4/packages/dotlrn/sql/postgresql/communities-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/communities-package-create.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn/sql/postgresql/communities-package-create.sql	8 Jul 2002 21:04:16 -0000	1.1
+++ openacs-4/packages/dotlrn/sql/postgresql/communities-package-create.sql	11 Jul 2002 15:54:13 -0000	1.2
@@ -160,7 +160,7 @@
 
 -- dotlrn_community
 
-select define_function_args('dotlrn_community__new','community_id,parent_community_id,community_type,community_key,pretty_name,description,portal_id,non_member_portal_id,package_id,join_policy,creation_date,creation_user,creation_ip,context_id');
+select define_function_args('dotlrn_community__new','community_id,parent_community_id,community_type,community_key,pretty_name,description,portal_id,non_member_portal_id,archived_p,package_id,join_policy,creation_date,creation_user,creation_ip,context_id');
 
 select define_function_args('dotlrn_community__set_active_dates','community_id,start_date,end_date');
 
@@ -184,7 +184,7 @@
         p_community_key                 alias for $4;
         p_pretty_name                   alias for $5;
         p_description                   alias for $6;
-	archived_p			alias for $7
+	p_archived_p			alias for $7;
         p_portal_id                     alias for $8;
         p_non_member_portal_id          alias for $9;
         p_package_id                    alias for $10;
@@ -196,26 +196,29 @@
         c_id                            integer;
 BEGIN
         c_id := acs_group__new (
-	    p_context_id,
             p_community_id,
             p_community_type,
             p_creation_date,
             p_creation_user,
             p_creation_ip,
+            null,
+            null,
             p_community_key,
-            p_join_policy
+            p_join_policy,
+	    p_context_id
         );
 
-        insert into dotlrn_communities
+        insert into dotlrn_communities_all
           (community_id, 
            parent_community_id,
            community_type, 
            community_key, 
            pretty_name,  
            description, 
            package_id, 
-           portal_id, 
-           portal_template_id)
+           portal_id,
+           archived_p,
+           non_member_portal_id)
         values
           (c_id, 
            p_parent_community_id, 
@@ -226,7 +229,6 @@
            p_package_id, 
            p_portal_id,
 	   p_archived_p,
-	   p_portal_id,
            p_non_member_portal_id);
 
         return c_id;        
