Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-clubs-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/Attic/dotlrn-clubs-create.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-clubs-create.sql	29 Mar 2002 19:14:44 -0000	1.2
+++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-clubs-create.sql	2 Jul 2002 18:40:08 -0000	1.3
@@ -24,12 +24,13 @@
 --
 -- @author Ben Adida (ben@openforce.net)
 -- @author yon (yon@openforce.net)
+-- @author dan chak (chak@openforce.net)
 -- @creation-date August 18th, 2001
 -- @version $Id$
 --
 
 create table dotlrn_clubs (
-    club_id                        integer
+    club_id                     integer
                                 constraint dotlrn_clubs_club_id_fk
                                 references dotlrn_communities (community_id)
                                 constraint dotlrn_clubs_pk
@@ -39,15 +40,7 @@
 create view dotlrn_clubs_full
 as
     select dotlrn_clubs.club_id,
-           dotlrn_communities.community_type,
-           dotlrn_communities.community_key,
-           dotlrn_communities.pretty_name,
-           dotlrn_communities.description,
-           dotlrn_communities.active_start_date,
-           dotlrn_communities.active_end_date,
-           dotlrn_communities.portal_id,
-           dotlrn_communities.portal_template_id,
-           dotlrn_communities.package_id,
+	   dotlrn_communities.*,
            dotlrn_community__url(dotlrn_communities.community_id) as url,
            groups.join_policy
     from dotlrn_communities,
@@ -57,7 +50,7 @@
     and dotlrn_communities.community_id = groups.group_id;
 
 
-select define_function_args ('dotlrn_club__new','club_id,community_key,pretty_name,description,package_id,portal_id,portal_template_id,join_policy,creation_date,creation_user,creation_ip,context_id');
+select define_function_args ('dotlrn_club__new','club_id,community_key,pretty_name,description,package_id,portal_id,non_member_portal_id,join_policy,creation_date,creation_user,creation_ip,context_id');
 
 select define_function_args ('dotlrn_club__delete','club_id');
 
@@ -66,29 +59,28 @@
 returns integer as '
 DECLARE
         p_club_id                        alias for $1;
-        p_community_key                        alias for $2;
-        p_pretty_name                        alias for $3;
-        p_description                        alias for $4;
-        p_package_id                        alias for $5;
-        p_portal_id                        alias for $6;
-        p_portal_template_id                alias for $7;
-        p_join_policy                        alias for $8;
-        p_creation_date                        alias for $9;
-        p_creation_user                        alias for $10;
-        p_creation_ip                        alias for $11;
-        p_context_id                        alias for $12;
+        p_community_key                  alias for $2;
+        p_pretty_name                    alias for $3;
+        p_description                    alias for $4;
+        p_package_id                     alias for $5;
+        p_portal_id                      alias for $6;
+        p_non_member_portal_id           alias for $7;
+        p_join_policy                    alias for $8;
+        p_creation_date                  alias for $9;
+        p_creation_user                  alias for $10;
+        p_creation_ip                    alias for $11;
+        p_context_id                     alias for $12;
         v_club_id                        integer;
 BEGIN
         v_club_id := dotlrn_community__new(
             p_club_id,
-            NULL,
             ''dotlrn_club'',
             p_community_key,
             p_pretty_name,
             p_description,
             p_package_id,
             p_portal_id,
-            p_portal_template_id,
+            p_non_member_portal_id,
             p_join_policy,
             p_creation_date,
             p_creation_user,
