Don't forget the date\!
[cocanwiki.git] / scripts / edit.ml
index 9cdcc93..a3d50a4 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.ml,v 1.37 2006/08/17 09:11:31 rich Exp $
+ * $Id: edit.ml,v 1.38 2006/12/06 09:46:57 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
@@ -35,9 +35,9 @@ open Cocanwiki_strings
 open Cocanwiki_pages
 
 let run r (q : cgi) dbh hostid {hostname = hostname} user =
-  let template = get_template dbh hostid "edit.html" in
-  let template_conflict = get_template dbh hostid "edit_conflict.html" in
-  let template_email = get_template dbh hostid "edit_page_email.txt" in
+  let template = get_template dbh hostid "edit.html" in
+  let template_conflict = get_template dbh hostid "edit_conflict.html" in
+  let template_email = get_template dbh hostid "edit_page_email.txt" in
 
   (* Workaround bugs in IE, specifically lack of support for <button>
    * elements.
@@ -340,7 +340,7 @@ let run r (q : cgi) dbh hostid {hostname = hostname} user =
             q#redirect ("http://" ^ hostname ^ "/" ^ url)
         | Wikilib.GenURL_TooShort | Wikilib.GenURL_BadURL ->
             error ~back_button:true ~title:"Bad page name"
-              dbh hostid q
+              dbh hostid q
               "The page name supplied is too short or invalid.";
             return ()
     );
@@ -424,8 +424,9 @@ let run r (q : cgi) dbh hostid {hostname = hostname} user =
        with
            SaveURLError ->
              error ~back_button:true ~title:"Page exists"
-               dbh hostid q ("While you were editing that page, it looks " ^
-                             "like another user created the same page.");
+               r dbh hostid q
+               ("While you were editing that page, it looks " ^
+                  "like another user created the same page.");
              return ()
 
          | SaveConflict (new_version, old_version, url, css) ->