(* 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
(* 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
(* 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
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
(* 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
(* 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
(* 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
(* 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 ->
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. *)
(* 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
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
(* 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
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 () =
(* 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
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
);
(* 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
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."
(* 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
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
(* 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
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.")
(* 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
"\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"
(* 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
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. *)
(* 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
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 ();
(* 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
*)
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. *)
(* 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
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
)
(* 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
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"
?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 = [] }
(* 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
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 ^ "." ^
(* 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
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."
(* 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
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
(* 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
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
(* 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
(* 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 "/"]
(* 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
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
(* 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
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