Index: openacs-4/packages/dotlrn/sql/oracle/community-memberships-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/community-memberships-create.sql,v diff -u -r1.4.12.1 -r1.4.12.2 --- openacs-4/packages/dotlrn/sql/oracle/community-memberships-create.sql 31 May 2005 23:13:03 -0000 1.4.12.1 +++ openacs-4/packages/dotlrn/sql/oracle/community-memberships-create.sql 22 Jul 2005 14:50:48 -0000 1.4.12.2 @@ -72,3 +72,31 @@ from dotlrn_member_rels_full, dotlrn_admin_rels where dotlrn_member_rels_full.rel_id = dotlrn_admin_rels.rel_id; + +-- Store emails to be sent when user joins a community +create table dotlrn_member_emails ( + email_id integer primary key, + community_id integer references dotlrn_communities_all (community_id) + on delete cascade, +-- Might be useful + type varchar2(30) default 'on join', + from_addr varchar2(256), + subject varchar2(4000), + email long, + enabled_p char(1) default 'f' + check (enabled_p in ('t', 'f')), + + constraint dotlrn_member_emails_un unique(community_id, type) +); + +create sequence dotlrn_member_emails_seq +start with 1 +increment by 1 +nomaxvalue; + +create trigger dotlrn_member_emails_trigger +before insert on dotlrn_member_emails +for each row +begin + select dotlrn_member_emails_seq.nextval into :new.email_id from dual; +end; \ No newline at end of file Index: openacs-4/packages/dotlrn/sql/postgresql/community-memberships-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/community-memberships-create.sql,v diff -u -r1.2.12.2 -r1.2.12.3 --- openacs-4/packages/dotlrn/sql/postgresql/community-memberships-create.sql 21 Jul 2005 22:48:54 -0000 1.2.12.2 +++ openacs-4/packages/dotlrn/sql/postgresql/community-memberships-create.sql 22 Jul 2005 14:50:48 -0000 1.2.12.3 @@ -74,8 +74,6 @@ dotlrn_admin_rels where dotlrn_member_rels_full.rel_id = dotlrn_admin_rels.rel_id; --- - -- Store emails to be sent when user joins a community create table dotlrn_member_emails ( email_id serial primary key, Index: openacs-4/packages/dotlrn/www/member-email-toggle.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/member-email-toggle.tcl,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/dotlrn/www/member-email-toggle.tcl 21 Jul 2005 22:48:54 -0000 1.1.2.1 +++ openacs-4/packages/dotlrn/www/member-email-toggle.tcl 22 Jul 2005 14:50:48 -0000 1.1.2.2 @@ -17,14 +17,6 @@ set community_id [dotlrn_community::get_community_id] -db_dml toggle_member_email { - update - dotlrn_member_emails - set - enabled_p = case when enabled_p = 't' then 'f'::boolean else 't'::boolean end - where - community_id = :community_id and - type = 'on join' -} +db_dml toggle_member_email { } ad_returnredirect "one-community-admin" \ No newline at end of file Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn/www/member-email-toggle.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/dotlrn/www/member-email.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/member-email.tcl,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/dotlrn/www/member-email.tcl 21 Jul 2005 22:48:54 -0000 1.1.2.1 +++ openacs-4/packages/dotlrn/www/member-email.tcl 22 Jul 2005 14:50:48 -0000 1.1.2.2 @@ -18,15 +18,7 @@ set community_id [dotlrn_community::get_community_id] dotlrn::require_user_admin_community -community_id $community_id -db_0or1row member_email { - select - email_id - from - dotlrn_member_emails - where - community_id = :community_id and - type = 'on join' -} +db_0or1row member_email { } ad_form -name "member_email" -form { {email_id:key} @@ -44,41 +36,17 @@ } -new_data { - db_dml new_email { - insert into - dotlrn_member_emails - (community_id, type, from_addr, subject, email) - values - (:community_id, 'on join', :from_addr, :subject, :email) - } + db_dml new_email { } } -edit_request { - db_1row member_email { - select - from_addr, - subject, - email - from - dotlrn_member_emails - where - email_id = :email_id - } + db_1row member_email_values { } set email [list $email ""] } -edit_data { - db_dml new_email { - update - dotlrn_member_emails - set - from_addr = :from_addr, - subject = :subject, - email = :email - where - email_id = :email_id - } + db_dml update_email { } } -after_submit { Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn/www/member-email.xql'. Fisheye: No comparison available. Pass `N' to diff?