From 295f2cde3f43ccf7f775d39b95925e10aa4c37cb Mon Sep 17 00:00:00 2001 From: rich Date: Thu, 31 Mar 2005 14:24:04 +0000 Subject: [PATCH] Fixed to match ChriS's API changes to mod_caml. --- scripts/admin/create_host.ml | 10 +++++----- scripts/admin/edit_host_css.ml | 18 +++++++++--------- scripts/admin/edit_hostnames.ml | 10 +++++----- scripts/contact.ml | 7 +++---- scripts/crash.ml | 4 ++-- scripts/create_contact.ml | 11 ++++++----- scripts/edit.ml | 4 ++-- scripts/edit_contact.ml | 10 +++++----- scripts/edit_host_css.ml | 10 +++++----- scripts/edit_page_css.ml | 10 +++++----- scripts/forgot_password.ml | 4 ++-- scripts/invite_user.ml | 4 ++-- scripts/invite_user_confirm.ml | 4 ++-- scripts/lib/cocanwiki.ml | 6 +++--- scripts/lib/cocanwiki_emailnotify.ml | 4 ++-- scripts/lib/cocanwiki_ok.ml | 16 ++++++++-------- scripts/login.ml | 6 +++--- scripts/logout.ml | 5 ++--- scripts/mailing_list_send.ml | 4 ++-- scripts/page_email_send.ml | 4 ++-- scripts/send_feedback.ml | 4 ++-- scripts/signup.ml | 4 ++-- scripts/user_prefs.ml | 4 ++-- 23 files changed, 81 insertions(+), 82 deletions(-) diff --git a/scripts/admin/create_host.ml b/scripts/admin/create_host.ml index 3fb8f44..5ba2ea0 100644 --- a/scripts/admin/create_host.ml +++ b/scripts/admin/create_host.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: create_host.ml,v 1.8 2004/10/09 12:24:48 rich Exp $ + * $Id: create_host.ml,v 1.9 2005/03/31 14:24:04 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 @@ -75,10 +75,10 @@ let run r = (* Print confirmation page. *) let buttons = [ - { StdPages.label = "OK"; - StdPages.link = "/_bin/admin/host.cmo"; - StdPages.method_ = None; - StdPages.params = [ "hostid", string_of_int hostid ] } + { Template.StdPages.label = "OK"; + Template.StdPages.link = "/_bin/admin/host.cmo"; + Template.StdPages.method_ = None; + Template.StdPages.params = [ "hostid", string_of_int hostid ] } ] in Cocanwiki_ok.ok ~title:"Wiki created" ~buttons diff --git a/scripts/admin/edit_host_css.ml b/scripts/admin/edit_host_css.ml index 5378a39..d3257fb 100644 --- a/scripts/admin/edit_host_css.ml +++ b/scripts/admin/edit_host_css.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: edit_host_css.ml,v 1.5 2004/09/09 12:21:22 rich Exp $ + * $Id: edit_host_css.ml,v 1.6 2005/03/31 14:24:04 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 @@ -44,14 +44,14 @@ let run r (q : cgi) (dbh : Dbi.connection) _ _ _ = dbh#commit (); let buttons = [ - { StdPages.label = "OK"; - StdPages.link = "/_bin/admin/host.cmo"; - StdPages.method_ = None; - StdPages.params = [ "hostid", string_of_int hostid ] }; - { StdPages.label = "Edit stylesheet again"; - StdPages.link = "/_bin/admin/edit_host_css_form.cmo"; - StdPages.method_ = None; - StdPages.params = [ "hostid", string_of_int hostid ] } + { Template.StdPages.label = "OK"; + Template.StdPages.link = "/_bin/admin/host.cmo"; + Template.StdPages.method_ = None; + Template.StdPages.params = [ "hostid", string_of_int hostid ] }; + { Template.StdPages.label = "Edit stylesheet again"; + Template.StdPages.link = "/_bin/admin/edit_host_css_form.cmo"; + Template.StdPages.method_ = None; + Template.StdPages.params = [ "hostid", string_of_int hostid ] } ] in ok ~title:"Stylesheet changed" ~buttons diff --git a/scripts/admin/edit_hostnames.ml b/scripts/admin/edit_hostnames.ml index a3a874a..ece222a 100644 --- a/scripts/admin/edit_hostnames.ml +++ b/scripts/admin/edit_hostnames.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: edit_hostnames.ml,v 1.6 2004/09/23 11:56:47 rich Exp $ + * $Id: edit_hostnames.ml,v 1.7 2005/03/31 14:24:04 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 @@ -80,10 +80,10 @@ let run r (q : cgi) (dbh : Dbi.connection) _ host' _ = (* Print confirmation page. *) let buttons = [ - { StdPages.label = "OK"; - StdPages.link = "/_bin/admin/host.cmo"; - StdPages.method_ = None; - StdPages.params = [ "hostid", string_of_int hostid ] } + { Template.StdPages.label = "OK"; + Template.StdPages.link = "/_bin/admin/host.cmo"; + Template.StdPages.method_ = None; + Template.StdPages.params = [ "hostid", string_of_int hostid ] } ] in ok ~title:"Saved" ~buttons diff --git a/scripts/contact.ml b/scripts/contact.ml index 16db870..3dd454b 100644 --- a/scripts/contact.ml +++ b/scripts/contact.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: contact.ml,v 1.7 2004/10/30 10:16:09 rich Exp $ + * $Id: contact.ml,v 1.8 2005/03/31 14:24:04 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 @@ -138,7 +138,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid {hostname = hostname} user = (* Send the initial email. *) let body = template#to_string in - Sendmail.send_mail ~subject ~to_addr:emails ~body (); + Sendmail.send_mail ~subject ~to_addr:emails body; (* Send the following uploads by email. *) List.iter (fun name -> @@ -148,8 +148,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid {hostname = hostname} user = let content_type = upload.upload_content_type in let body = upload.upload_value in - Sendmail.send_mail ~subject ~to_addr:emails ~content_type - ~body ()) + Sendmail.send_mail ~subject ~to_addr:emails ~content_type body) uploads; (* Confirm. *) diff --git a/scripts/crash.ml b/scripts/crash.ml index 07d8839..232ec4b 100644 --- a/scripts/crash.ml +++ b/scripts/crash.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: crash.ml,v 1.3 2004/10/24 08:48:38 rich Exp $ + * $Id: crash.ml,v 1.4 2005/03/31 14:24:04 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 @@ -56,7 +56,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid let body = "Crash at " ^ time ^ "\n" ^ "Hostname is " ^ canonical_hostname ^ "\n" ^ "Please see the error log for details." in - Sendmail.send_mail ~subject ~body ~to_addr:[email] (); + Sendmail.send_mail ~subject ~to_addr:[email] body; true in diff --git a/scripts/create_contact.ml b/scripts/create_contact.ml index 30a531f..61eebeb 100644 --- a/scripts/create_contact.ml +++ b/scripts/create_contact.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: create_contact.ml,v 1.2 2004/09/23 11:56:47 rich Exp $ + * $Id: create_contact.ml,v 1.3 2005/03/31 14:24:04 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 @@ -75,10 +75,11 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = let msg = sprintf "Contact form created. The contact id is %d. On the next page you will be given some same code which you should copy and paste onto a web page to create a simple form, which can then be modified for your requirements." contactid in - let buttons = [ { StdPages.label = " View contact form "; - StdPages.link = "/_bin/contact_show.cmo"; - StdPages.method_ = None; - StdPages.params = [ "id", string_of_int contactid ] } ] in + let buttons = [ { Template.StdPages.label = " View contact form "; + Template.StdPages.link = "/_bin/contact_show.cmo"; + Template.StdPages.method_ = None; + Template.StdPages.params = + [ "id", string_of_int contactid ] } ] in ok ~title:"Contact form created" ~buttons q msg let () = diff --git a/scripts/edit.ml b/scripts/edit.ml index 893a17f..8b44823 100644 --- a/scripts/edit.ml +++ b/scripts/edit.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: edit.ml,v 1.25 2004/12/01 13:55:55 rich Exp $ + * $Id: edit.ml,v 1.26 2005/03/31 14:24:04 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 @@ -407,7 +407,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid {hostname = hostname} user = template_email#set "opt_out" opt_out; let body = template_email#to_string in Sendmail.send_mail ~subject - ~to_addr:[to_addr] ~body ()) + ~to_addr:[to_addr] body) addrs ); diff --git a/scripts/edit_contact.ml b/scripts/edit_contact.ml index 18b4a5c..8fe5551 100644 --- a/scripts/edit_contact.ml +++ b/scripts/edit_contact.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: edit_contact.ml,v 1.2 2004/09/23 11:56:47 rich Exp $ + * $Id: edit_contact.ml,v 1.3 2005/03/31 14:24:04 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 @@ -87,10 +87,10 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = let buttons = [ ok_button "/_bin/contacts.cmo"; - { StdPages.label = " View contact form "; - StdPages.link = "/_bin/contact_show.cmo"; - StdPages.method_ = None; - StdPages.params = [ "id", string_of_int id ] } ] in + { Template.StdPages.label = " View contact form "; + Template.StdPages.link = "/_bin/contact_show.cmo"; + Template.StdPages.method_ = None; + Template.StdPages.params = [ "id", string_of_int id ] } ] in ok ~title:"Contact form edited" ~buttons q "The contact form was edited." diff --git a/scripts/edit_host_css.ml b/scripts/edit_host_css.ml index 7d48632..8f7afc4 100644 --- a/scripts/edit_host_css.ml +++ b/scripts/edit_host_css.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: edit_host_css.ml,v 1.3 2004/10/23 09:36:11 rich Exp $ + * $Id: edit_host_css.ml,v 1.4 2005/03/31 14:24:04 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 @@ -43,10 +43,10 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = let buttons = [ ok_button "/_bin/host_menu.cmo"; - { StdPages.label = "Edit stylesheet again"; - StdPages.link = "/_bin/edit_host_css_form.cmo"; - StdPages.method_ = None; - StdPages.params = [] } + { Template.StdPages.label = "Edit stylesheet again"; + Template.StdPages.link = "/_bin/edit_host_css_form.cmo"; + Template.StdPages.method_ = None; + Template.StdPages.params = [] } ] in ok ~title:"Global stylesheet changed" ~buttons diff --git a/scripts/edit_page_css.ml b/scripts/edit_page_css.ml index 1ff9ad3..ab29fa0 100644 --- a/scripts/edit_page_css.ml +++ b/scripts/edit_page_css.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: edit_page_css.ml,v 1.15 2004/11/01 12:57:53 rich Exp $ + * $Id: edit_page_css.ml,v 1.16 2005/03/31 14:24:04 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 @@ -102,10 +102,10 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid {hostname = hostname} user = email_notify ~subject ~body ~user dbh hostid; let buttons = [ ok_button ("/" ^ page); - { StdPages.label = "Edit stylesheet again"; - StdPages.link = "/_bin/edit_page_css_form.cmo"; - StdPages.method_ = None; - StdPages.params = [ "page", page ] } ] in + { Template.StdPages.label = "Edit stylesheet again"; + Template.StdPages.link = "/_bin/edit_page_css_form.cmo"; + Template.StdPages.method_ = None; + Template.StdPages.params = [ "page", page ] } ] in ok ~title:"Stylesheet changed" ~buttons q ("The stylesheet was changed successfully. " ^ "Note: You must RELOAD the page to see changes to stylesheets.") diff --git a/scripts/forgot_password.ml b/scripts/forgot_password.ml index 20608b7..88a4833 100644 --- a/scripts/forgot_password.ml +++ b/scripts/forgot_password.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: forgot_password.ml,v 1.6 2004/10/09 12:20:57 rich Exp $ + * $Id: forgot_password.ml,v 1.7 2005/03/31 14:24:04 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 @@ -65,7 +65,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ = "\n" ^ "IP address of request: " ^ ip ^ "\n" in - Sendmail.send_mail ~subject ~to_addr:[ email ] ~body (); + Sendmail.send_mail ~subject ~to_addr:[ email ] body; let buttons = [ ok_button "/_login" ] in ok ~buttons ~title:"Password sent by email" diff --git a/scripts/invite_user.ml b/scripts/invite_user.ml index 2895d78..8ca0d8f 100644 --- a/scripts/invite_user.ml +++ b/scripts/invite_user.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: invite_user.ml,v 1.3 2004/10/30 10:16:10 rich Exp $ + * $Id: invite_user.ml,v 1.4 2005/03/31 14:24:04 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 @@ -98,7 +98,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid {hostname = hostname} user = template#to_string in (* Send the email. *) - Sendmail.send_mail ~subject ~to_addr:[email] ~from ~body () + Sendmail.send_mail ~subject ~to_addr:[email] ~from body ) emails; (* Finish off. *) diff --git a/scripts/invite_user_confirm.ml b/scripts/invite_user_confirm.ml index 45374c5..ad51a49 100644 --- a/scripts/invite_user_confirm.ml +++ b/scripts/invite_user_confirm.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: invite_user_confirm.ml,v 1.2 2004/10/23 15:00:15 rich Exp $ + * $Id: invite_user_confirm.ml,v 1.3 2005/03/31 14:24:04 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 @@ -87,7 +87,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ = let body = template#to_string in let subject = "Your new account details" in - Sendmail.send_mail ~to_addr:[email] ~subject ~body ()); + Sendmail.send_mail ~to_addr:[email] ~subject body); dbh#commit (); diff --git a/scripts/lib/cocanwiki.ml b/scripts/lib/cocanwiki.ml index 38480ba..33eb3b5 100644 --- a/scripts/lib/cocanwiki.ml +++ b/scripts/lib/cocanwiki.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: cocanwiki.ml,v 1.4 2004/11/10 16:52:04 rich Exp $ + * $Id: cocanwiki.ml,v 1.5 2005/03/31 14:24:04 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 @@ -154,8 +154,8 @@ let register_script ?(restrict = []) ?(anonymous = true) run = *) if q#param_exists "cookie" then ( let value = q#param "cookie" in - let cookie = Cookie.cookie ~name:"auth" ~value ~path:"/" () in - Table.set (Request.headers_out r) "Set-Cookie" cookie#as_string; + let cookie = Cookie.cookie "auth" value ~path:"/" in + Table.set (Request.headers_out r) "Set-Cookie" cookie#to_string; value ) else ( (* Normal cookie, from the headers. *) diff --git a/scripts/lib/cocanwiki_emailnotify.ml b/scripts/lib/cocanwiki_emailnotify.ml index 937d5f2..59f3b04 100644 --- a/scripts/lib/cocanwiki_emailnotify.ml +++ b/scripts/lib/cocanwiki_emailnotify.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: cocanwiki_emailnotify.ml,v 1.5 2004/11/01 12:57:53 rich Exp $ + * $Id: cocanwiki_emailnotify.ml,v 1.6 2005/03/31 14:24:04 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 @@ -70,5 +70,5 @@ let email_notify ~subject ~body ?user (dbh : Dbi.connection) hostid = let subject = "Site notice: " ^ subject in (* Send the email. *) - Sendmail.send_mail ~subject ~to_addr ~body ?from () + Sendmail.send_mail ~subject ~to_addr ?from body ) diff --git a/scripts/lib/cocanwiki_ok.ml b/scripts/lib/cocanwiki_ok.ml index 70ac52f..4a1ca08 100644 --- a/scripts/lib/cocanwiki_ok.ml +++ b/scripts/lib/cocanwiki_ok.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: cocanwiki_ok.ml,v 1.1 2004/10/21 11:42:05 rich Exp $ + * $Id: cocanwiki_ok.ml,v 1.2 2005/03/31 14:24:05 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 @@ -26,7 +26,7 @@ open Printf open Cocanwiki_template -(* Override StdPages.ok and StdPages.error with out our versions. +(* Override Template.StdPages.ok and Template.StdPages.error with our versions. * Also have some standard buttons around. *) let ok_error_template = _get_template "ok_error.html" @@ -35,15 +35,15 @@ let error ?cookie ?cookies ?title ?(icon = "/_graphics/error.png") ?icon_alt ?back_button ?close_button q message = (* Set the status so scripts can determine if the request failed. *) Request.set_status q#request cHTTP_BAD_REQUEST; - StdPages.error ?cookie ?cookies ~template:ok_error_template + Template.StdPages.error ?cookie ?cookies ~template:ok_error_template ?title ~icon ?icon_alt ?back_button ?close_button q message let ok ?cookie ?cookies ?title ?(icon = "/_graphics/ok.png") ?icon_alt ?back_button ?close_button ?buttons q message = - StdPages.ok ?cookie ?cookies ~template:ok_error_template + Template.StdPages.ok ?cookie ?cookies ~template:ok_error_template ?title ~icon ?icon_alt ?back_button ?close_button ?buttons q message -let ok_button url = { StdPages.label = " OK "; - StdPages.link = url; - StdPages.method_ = None; - StdPages.params = [] } +let ok_button url = { Template.StdPages.label = " OK "; + Template.StdPages.link = url; + Template.StdPages.method_ = None; + Template.StdPages.params = [] } diff --git a/scripts/login.ml b/scripts/login.ml index 0d802ad..4b55be7 100644 --- a/scripts/login.ml +++ b/scripts/login.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: login.ml,v 1.5 2004/10/14 15:57:15 rich Exp $ + * $Id: login.ml,v 1.6 2005/03/31 14:24:04 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 @@ -62,9 +62,9 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = let cookie = if permanent then - Cookie.cookie ~name:"auth" ~value:cookie ~path:"/" ~expires () + Cookie.cookie "auth" cookie ~path:"/" ~expires else - Cookie.cookie ~name:"auth" ~value:cookie ~path:"/" () in + Cookie.cookie "auth" cookie ~path:"/" in ok ~title:"Logged in" ~buttons:[ok_button redirect] ~cookie q ("Welcome " ^ username ^ "." ^ diff --git a/scripts/logout.ml b/scripts/logout.ml index eb1028e..e4827bc 100644 --- a/scripts/logout.ml +++ b/scripts/logout.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: logout.ml,v 1.4 2004/10/30 10:16:10 rich Exp $ + * $Id: logout.ml,v 1.5 2005/03/31 14:24:04 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 @@ -44,8 +44,7 @@ let run r (q : cgi) (dbh : Dbi.connection) _ _ user = dbh#commit () ); - let cookie = - Cookie.cookie ~name:"auth" ~value:"none" ~path:"/" ~expires () in + let cookie = Cookie.cookie "auth" "none" ~path:"/" ~expires in ok ~title:"Logged out" ~buttons:[ok_button "/"] ~cookie q "You have been logged out." diff --git a/scripts/mailing_list_send.ml b/scripts/mailing_list_send.ml index 5974e13..623cfff 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.4 2004/10/04 15:19:56 rich Exp $ + * $Id: mailing_list_send.ml,v 1.5 2005/03/31 14:24:04 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 @@ -87,7 +87,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ = let body = template#to_string in let subject = "Site notice: " ^ hostname ^ ": Confirm your email address" in - Sendmail.send_mail ~subject ~body ~to_addr:[email] (); + Sendmail.send_mail ~subject ~to_addr:[email] body; (* Finish up. *) let buttons = [ ok_button "/" ] in diff --git a/scripts/page_email_send.ml b/scripts/page_email_send.ml index f2726d7..49b0b28 100644 --- a/scripts/page_email_send.ml +++ b/scripts/page_email_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: page_email_send.ml,v 1.2 2004/10/04 15:19:56 rich Exp $ + * $Id: page_email_send.ml,v 1.3 2005/03/31 14:24:04 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 @@ -88,7 +88,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ = let body = template#to_string in let subject = "Site notice: " ^ hostname ^ ": Confirm your email address" in - Sendmail.send_mail ~subject ~body ~to_addr:[email] (); + Sendmail.send_mail ~subject ~to_addr:[email] body; (* Finish up. *) let buttons = [ ok_button ("/" ^ page) ] in diff --git a/scripts/send_feedback.ml b/scripts/send_feedback.ml index 84e8a73..a2929a1 100644 --- a/scripts/send_feedback.ml +++ b/scripts/send_feedback.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: send_feedback.ml,v 1.4 2004/10/30 10:16:10 rich Exp $ + * $Id: send_feedback.ml,v 1.5 2005/03/31 14:24:04 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 @@ -82,7 +82,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid {hostname = hostname} user = (* Send the feedback email. *) let subject = "Wiki feedback: Feedback about " ^ page ^ " page" in let body = template#to_string in - Sendmail.send_mail ~subject ~to_addr:[to_addr] ~body (); + Sendmail.send_mail ~subject ~to_addr:[to_addr] body; (* Confirm. *) ok ~title:"Thank you for your feedback" ~buttons:[ok_button "/"] diff --git a/scripts/signup.ml b/scripts/signup.ml index 5e8fc5f..315c153 100644 --- a/scripts/signup.ml +++ b/scripts/signup.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: signup.ml,v 1.6 2004/09/23 11:56:47 rich Exp $ + * $Id: signup.ml,v 1.7 2005/03/31 14:24:04 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 @@ -99,7 +99,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = dbh#commit (); let buttons = [ ok_button "/" ] in - let cookie = Cookie.cookie ~name:"auth" ~value:cookie ~path:"/" () in + let cookie = Cookie.cookie "auth" cookie ~path:"/" in ok ~title:"Account created" ~buttons diff --git a/scripts/user_prefs.ml b/scripts/user_prefs.ml index b7c6729..8884c83 100644 --- a/scripts/user_prefs.ml +++ b/scripts/user_prefs.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: user_prefs.ml,v 1.4 2004/11/01 12:57:53 rich Exp $ + * $Id: user_prefs.ml,v 1.5 2005/03/31 14:24:04 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 @@ -83,7 +83,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid {hostname=hostname} user = let body = email_change_template#to_string in let subject = "Please verify your new email address at " ^ hostname in - Sendmail.send_mail ~subject ~to_addr:[new_email] ~body () + Sendmail.send_mail ~subject ~to_addr:[new_email] body ); changed -- 1.8.3.1