(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: edit_sitemenu.ml,v 1.4 2004/09/09 12:21:22 rich Exp $
+ * $Id: edit_sitemenu.ml,v 1.6 2004/10/21 19:54:29 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
*)
type model_t = (string * string) list (* label, url *)
-let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } user=
let template = get_template dbh hostid "edit_sitemenu.html" in
(* Workaround bugs in IE, specifically lack of support for <button>
let body = fun () -> "Site: http://" ^ hostname ^ "/\n\n" in
- email_notify ~body ~subject dbh hostid;
+ email_notify ~body ~subject ~user dbh hostid;
let buttons = [ ok_button "/" ] in
ok ~title:"Saved" ~buttons
if q#param_true "inedit" then (
if q#param_true "cancel" then (
cancel ();
- raise CgiExit
+ return ()
);
if q#param_true "save" then (
let ok = try_save () in
- if ok then raise CgiExit (* ... else fall through *)
+ if ok then return () (* ... else fall through *)
);
continue_editing () (* Processes the action, if any. *)
) else