X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=scripts%2Fedit_contact.ml;h=46002f933bf9355b5ea3b7fbf98bb293fe38613f;hb=e828b148d6338765d7f5ca8f10567d5d9ef00548;hp=18b4a5cd9e841e1390eef5c67d20b4b76e73d1ba;hpb=6b0b6830a2e784eee99dcd1b1a3cb8b44e27c765;p=cocanwiki.git diff --git a/scripts/edit_contact.ml b/scripts/edit_contact.ml index 18b4a5c..46002f9 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.4 2005/11/24 14:54:11 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,20 +44,22 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = if name = "" then ( error ~back_button:true ~title:"Name field missing" - q "You must name your contact form."; + dbh hostid q "You must name your contact form."; return () ); if subject = "" then ( error ~back_button:true ~title:"Subject line missing" - q "You must give a subject line, which appears on contact emails."; + dbh hostid q + "You must give a subject line, which appears on contact emails."; return () ); if emails = [] then ( error ~back_button:true ~title:"No email addresses" - q ("There are no email addresses listed for this contact form. You " ^ - "must list at least one valid email address."); + dbh hostid q + ("There are no email addresses listed for this contact form. You " ^ + "must list at least one valid email address."); return () ); @@ -87,12 +89,12 @@ 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." + dbh hostid q "The contact form was edited." let () = register_script ~restrict:[CanManageContacts] run