Fixed to match ChriS's API changes to mod_caml.
authorrich <rich>
Thu, 31 Mar 2005 14:24:04 +0000 (14:24 +0000)
committerrich <rich>
Thu, 31 Mar 2005 14:24:04 +0000 (14:24 +0000)
23 files changed:
scripts/admin/create_host.ml
scripts/admin/edit_host_css.ml
scripts/admin/edit_hostnames.ml
scripts/contact.ml
scripts/crash.ml
scripts/create_contact.ml
scripts/edit.ml
scripts/edit_contact.ml
scripts/edit_host_css.ml
scripts/edit_page_css.ml
scripts/forgot_password.ml
scripts/invite_user.ml
scripts/invite_user_confirm.ml
scripts/lib/cocanwiki.ml
scripts/lib/cocanwiki_emailnotify.ml
scripts/lib/cocanwiki_ok.ml
scripts/login.ml
scripts/logout.ml
scripts/mailing_list_send.ml
scripts/page_email_send.ml
scripts/send_feedback.ml
scripts/signup.ml
scripts/user_prefs.ml

index 3fb8f44..5ba2ea0 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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
index 5378a39..d3257fb 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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
index a3a874a..ece222a 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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
index 16db870..3dd454b 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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. *)
index 07d8839..232ec4b 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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
 
index 30a531f..61eebeb 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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 <html> 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 () =
index 893a17f..8b44823 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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
       );
 
index 18b4a5c..8fe5551 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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."
 
index 7d48632..8f7afc4 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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
index 1ff9ad3..ab29fa0 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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.")
index 20608b7..88a4833 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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"
index 2895d78..8ca0d8f 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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. *)
index 45374c5..ad51a49 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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 ();
 
index 38480ba..33eb3b5 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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. *)
index 937d5f2..59f3b04 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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
   )
index 70ac52f..4a1ca08 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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 = [] }
index 0d802ad..4b55be7 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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 ^ "." ^
index eb1028e..e4827bc 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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."
index 5974e13..623cfff 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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
index f2726d7..49b0b28 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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
index 84e8a73..a2929a1 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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 "/"]
index 5e8fc5f..315c153 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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
index b7c6729..8884c83 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * 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