Fixed some bitrot and some unused variables.
[cocanwiki.git] / scripts / edit_sitemenu.ml
index 6680e52..6c7aebb 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.11 2006/03/27 19:10:29 rich Exp $
+ * $Id: edit_sitemenu.ml,v 1.12 2006/07/26 13:12:10 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
@@ -78,7 +78,7 @@ let run r (q : cgi) dbh hostid { hostname = hostname } user=
   (* Check for errors in the model. *)
   let check_for_errors model =
     let errors = ref [] in
-    let add_error msg = errors := msg :: !errors in
+(*    let add_error msg = errors := msg :: !errors in *)
     let get_errors () = List.rev !errors in
 
     (* XXX Not implemented yet. *)
@@ -290,10 +290,8 @@ let run r (q : cgi) dbh hostid { hostname = hostname } user=
    *   page - the page URL opened newly for editing.
    *)
   if q#param_true "inedit" then (
-    if q#param_true "cancel" then (
+    if q#param_true "cancel" then
       cancel ();
-      return ()
-    );
     if q#param_true "save" then (
       let ok = try_save () in
       if ok then return ()             (* ... else fall through *)