(* 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
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 r dbh hostid "edit.html" in
+ let template_conflict = get_template r dbh hostid "edit_conflict.html" in
+ let template_email = get_template r dbh hostid "edit_page_email.txt" in
(* Workaround bugs in IE, specifically lack of support for <button>
* elements.
q#redirect ("http://" ^ hostname ^ "/" ^ url)
| Wikilib.GenURL_TooShort | Wikilib.GenURL_BadURL ->
error ~back_button:true ~title:"Bad page name"
- dbh hostid q
+ r dbh hostid q
"The page name supplied is too short or invalid.";
return ()
);
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) ->