Commented a bug.
[cocanwiki.git] / scripts / edit_sitemenu.ml
index 38cba43..c283178 100644 (file)
@@ -1,7 +1,7 @@
 (* 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.5 2004/09/23 11:56:47 rich Exp $
+ * $Id: edit_sitemenu.ml,v 1.7 2004/11/03 11:15:45 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
@@ -38,7 +38,7 @@ open Cocanwiki_strings
  *)
 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>
@@ -273,9 +273,9 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
 
       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
+      let buttons = [ ok_button "/_bin/host_menu.cmo" ] in
       ok ~title:"Saved" ~buttons
         q "The site menu was saved."
     );
@@ -284,7 +284,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
   in
 
   let cancel () =
-    q#redirect ("http://" ^ hostname ^ "/")
+    q#redirect ("http://" ^ hostname ^ "/_bin/host_menu.cmo")
   in
 
   (* This codes decides where we are in the current editing cycle.