X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=scripts%2Fedit_contact.ml;h=8fe5551ea3d454fcc37a30a6173fa74efcd43237;hb=295f2cde3f43ccf7f775d39b95925e10aa4c37cb;hp=88077e6b59c4e91e01d987e6017fe40a5fbbcfdf;hpb=b19eb2c96aef3bc2c0914376984dfb45fdab4f18;p=cocanwiki.git diff --git a/scripts/edit_contact.ml b/scripts/edit_contact.ml index 88077e6..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.1 2004/09/21 18:24:15 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 @@ -45,20 +45,20 @@ 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."; - raise CgiExit + return () ); if subject = "" then ( error ~back_button:true ~title:"Subject line missing" q "You must give a subject line, which appears on contact emails."; - raise CgiExit + 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."); - raise CgiExit + return () ); (* Need to verify that the contact belongs to the host. *) @@ -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."