(* COCANWIKI scripts. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. * $Id: edit.ml,v 1.6 2004/09/08 15:46:53 rich Exp $ *) open Apache open Registry open Cgi open Printf open ExtString open Cocanwiki open Cocanwiki_template open Cocanwiki_ok open Cocanwiki_emailnotify open Cocanwiki_diff open Cocanwiki_strings (* We keep an "internal model" of the page - see build_internal_model () * below. *) type model_t = { id : int; (* Original page ID. *) description : string; (* Description. *) redirect : string; (* Redirect to ("" = none). *) contents : (string * string * string) list; (* (sectionname, divname, content) * for each section. *) } let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname, _) _ = let template = get_template dbh hostid "edit.html" in let template_conflict = get_template dbh hostid "edit_conflict.html" in (* Workaround bugs in IE, specifically lack of support for