(* 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.13 2006/07/31 09:49:42 rich Exp $
+ * $Id: contact.ml,v 1.14 2006/12/06 09:46:56 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 subj_rex = Pcre.regexp "\\$\\w+"
let run r (q : cgi) dbh hostid {hostname = hostname} user =
- let template = get_template dbh hostid "contact.txt" in
+ let template = get_template r dbh hostid "contact.txt" in
let fail msg =
error ~back_button:true ~title:"Bad form"
- dbh hostid q (msg ^ " Please contact the owner of the site by email.");
+ r dbh hostid q
+ (msg ^ " Please contact the owner of the site by email.");
return ()
in
(* Confirm. *)
ok ~title:"Thank you for your contact" ~buttons:[ok_button "/"]
- dbh hostid q "An email was sent and you should receive a reply shortly."
+ r dbh hostid q "An email was sent and you should receive a reply shortly."
let () =
register_script ~restrict:[CanView] run