Index: openacs-4/packages/dotlrn/sql/postgresql/community-memberships-packages-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/community-memberships-packages-create.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/dotlrn/sql/postgresql/community-memberships-packages-create.sql	15 Jul 2002 18:32:24 -0000	1.2
+++ openacs-4/packages/dotlrn/sql/postgresql/community-memberships-packages-create.sql	9 Aug 2002 16:24:16 -0000	1.3
@@ -33,9 +33,6 @@
 
 select define_function_args('dotlrn_member_rel__new','rel_id,rel_type;dotlrn_member_rel,portal_id,community_id,user_id,member_state;approved,creation_user,creation_ip');
 
-select define_function_args('dotlrn_member_rel__delete','rel_id');
-
-
 create function dotlrn_member_rel__new(integer,varchar,integer,integer,integer,varchar,integer,varchar)
 returns integer as '
 DECLARE
@@ -70,12 +67,14 @@
 ' language 'plpgsql';
 
 
+select define_function_args('dotlrn_member_rel__delete','rel_id');
+
 create function dotlrn_member_rel__delete(integer)
 returns integer as '
 DECLARE
         p_rel_id                alias for $1;
 BEGIN
-        delete from dotlrn_member_rels where rel_id= p_rel_id;
+        delete from dotlrn_member_rels where rel_id = p_rel_id; 
 
         PERFORM membership_rel__delete(p_rel_id);
 
@@ -87,8 +86,6 @@
 
 select define_function_args('dotlrn_admin_rel__new','rel_id,rel_type;dotlrn_admin_rel,community_id,user_id,member_state,portal_id,creation_user,creation_ip');
 
-select define_function_args('dotlrn_admin_rel__delete','rel_id');
-
 create function dotlrn_admin_rel__new(integer,varchar,integer,integer,varchar,integer,integer,varchar)
 returns integer as '
 DECLARE
@@ -124,14 +121,16 @@
 ' language 'plpgsql';
 
 
+select define_function_args('dotlrn_admin_rel__delete','rel_id');
+
 create function dotlrn_admin_rel__delete(integer)
 returns integer as '
 DECLARE
         p_rel_id                alias for $1;
 BEGIN
-        delete from dotlrn_admin_rels where rel_id= p_rel_id;
+        delete from dotlrn_admin_rels where rel_id = p_rel_id;
 
-        PERFORM dotlrn_admin_rel__delete(p_rel_id);
+        PERFORM dotlrn_member_rel__delete(p_rel_id);
 
         return 0;
 END;
@@ -140,8 +139,6 @@
 
 select define_function_args('dotlrn_student_rel__new','rel_id,rel_type;dotlrn_student_rel,portal_id,class_instance_id,user_id,member_state,creation_user,creation_ip');
 
-select define_function_args('dotlrn_student_rel__delete','rel_id');
-
 create function dotlrn_student_rel__new(integer,varchar,integer,integer,integer,varchar,integer,varchar)
 returns integer as '
 DECLARE
@@ -177,6 +174,8 @@
 ' language 'plpgsql';
 
 
+select define_function_args('dotlrn_student_rel__delete','rel_id');
+
 create function dotlrn_student_rel__delete(integer)
 returns integer as '
 DECLARE
