Modified all scripts with appropriate restrictions based on
[cocanwiki.git] / scripts / edit.ml
index d86815c..410e9e0 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI scripts.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: edit.ml,v 1.1 2004/09/07 10:14:09 rich Exp $
+ * $Id: edit.ml,v 1.4 2004/09/08 09:54:28 rich Exp $
  *)
 
 open Apache
@@ -11,12 +11,12 @@ open Printf
 
 open ExtString
 
-open Merjisforwiki
-
 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"
@@ -33,7 +33,7 @@ type model_t = {
                                         * for each section. *)
 }
 
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname) _ =
+let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname, _) _ =
   (* Workaround bugs in IE, specifically lack of support for <button>
    * elements.
    *)
@@ -479,4 +479,4 @@ let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname) _ =
   q#template template
 
 let () =
-  register_script run
+  register_script ~restrict:[CanEdit] run