All new templates. Site menu displays basically everywhere.
[cocanwiki.git] / scripts / create.ml
index c7bc6f2..3da0560 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI scripts.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: create.ml,v 1.2 2004/09/07 13:40:10 rich Exp $
+ * $Id: create.ml,v 1.4 2004/09/09 09:35:33 rich Exp $
  *)
 
 open Apache
@@ -15,7 +15,7 @@ open Cocanwiki
 open Cocanwiki_emailnotify
 open Cocanwiki_ok
 
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
   (* Get the page title. *)
   let title = q#param "title" in
 
@@ -75,4 +75,4 @@ let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname, _) _ =
   q#redirect ("http://" ^ hostname ^ "/" ^ url ^ "/edit")
 
 let () =
-  register_script run
+  register_script ~restrict:[CanEdit] run