(* COCANWIKI scripts. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. * $Id: edit.ml,v 1.3 2004/09/07 14:58:34 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 let template = get_template "edit.html" let template_conflict = get_template "edit_conflict.html" (* 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, _) _ = (* Workaround bugs in IE, specifically lack of support for