X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=scripts%2Fmailing_list_send.ml;h=6fd1a19a05cab6b083a03856c22e6e9d9df55bf8;hb=f33343df3525e01f05ecf80628cd46b6e5841001;hp=6fcbfcc61df0eb350df75eb7741981adaa3debf4;hpb=d5e16b1ffdc77f6212666db32314b5b5f4f457a2;p=cocanwiki.git diff --git a/scripts/mailing_list_send.ml b/scripts/mailing_list_send.ml index 6fcbfcc..6fd1a19 100644 --- a/scripts/mailing_list_send.ml +++ b/scripts/mailing_list_send.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: mailing_list_send.ml,v 1.2 2004/09/24 16:45:02 rich Exp $ + * $Id: mailing_list_send.ml,v 1.3 2004/09/24 17:11:57 rich Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,6 +33,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ = let template = get_template dbh hostid "mailing_list_send.txt" in let email = trim (q#param "email") in + let name = trim (q#param "name") in if email = "" then ( error ~title:"No email address" ~back_button:true @@ -72,9 +73,10 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ = let opt_out = random_sessionid () in (* Insert into the database. *) - let sth = dbh#prepare_cached "insert into mailing_lists (hostid, email, - pending, opt_out) values (?, ?, ?, ?)" in - sth#execute [`Int hostid; `String email; `String pending; `String opt_out]; + let sth = dbh#prepare_cached "insert into mailing_lists (hostid, email, name, + pending, opt_out) values (?, ?, ?, ?, ?)" in + sth#execute [`Int hostid; `String email; `String name; + `String pending; `String opt_out]; dbh#commit ();