From: rich
Date: Thu, 9 Sep 2004 09:35:33 +0000 (+0000)
Subject: All new templates. Site menu displays basically everywhere.
X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=1f125fd7a6794f352f30de71a3905d5356a07008;p=cocanwiki.git
All new templates. Site menu displays basically everywhere.
Added the "host" object which simplified how scripts are called / makes
them more robust to future changes.
---
diff --git a/scripts/admin/admin.ml b/scripts/admin/admin.ml
index 2394428..2889e37 100644
--- a/scripts/admin/admin.ml
+++ b/scripts/admin/admin.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: admin.ml,v 1.4 2004/09/08 15:46:53 rich Exp $
+ * $Id: admin.ml,v 1.5 2004/09/09 09:35:34 rich Exp $
*)
open Apache
@@ -15,7 +15,7 @@ open Cocanwiki_date
let template = _get_template "admin/admin.html"
-let run r (q : cgi) (dbh : Dbi.connection) _ _ =
+let run r (q : cgi) (dbh : Dbi.connection) _ _ _ =
(* Select out the alternative hostnames. *)
let sth = dbh#prepare_cached
"select hs.hostid, hs.name from hostnames hs
diff --git a/scripts/admin/edit_emails.ml b/scripts/admin/edit_emails.ml
index 4f5abb8..1eaa376 100644
--- a/scripts/admin/edit_emails.ml
+++ b/scripts/admin/edit_emails.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: edit_emails.ml,v 1.3 2004/09/07 14:58:34 rich Exp $
+ * $Id: edit_emails.ml,v 1.4 2004/09/09 09:35:35 rich Exp $
*)
open Apache
@@ -16,11 +16,11 @@ open Cocanwiki_strings
let split_re = Pcre.regexp "[\\r\\n,;]+"
let email_re = Pcre.regexp "(.*)<(.*)>"
-let run r (q : cgi) (dbh : Dbi.connection) host_stuff _ =
+let run r (q : cgi) (dbh : Dbi.connection) _ host' _ =
let hostid = int_of_string (q#param "hostid") in
if q#param_true "cancel" then (
- let _, hostname, _ = host_stuff in
+ let { hostname = hostname } = host' in
q#redirect ("http://" ^ hostname ^ "/_bin/admin/host.cmo?hostid=" ^
string_of_int hostid);
raise CgiExit
diff --git a/scripts/admin/edit_emails_form.ml b/scripts/admin/edit_emails_form.ml
index b057473..eb793cd 100644
--- a/scripts/admin/edit_emails_form.ml
+++ b/scripts/admin/edit_emails_form.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: edit_emails_form.ml,v 1.3 2004/09/08 15:46:53 rich Exp $
+ * $Id: edit_emails_form.ml,v 1.4 2004/09/09 09:35:35 rich Exp $
*)
open Apache
@@ -14,7 +14,7 @@ open Cocanwiki_template
let template = _get_template "admin/edit_emails_form.html"
-let run r (q : cgi) (dbh : Dbi.connection) _ _ =
+let run r (q : cgi) (dbh : Dbi.connection) _ _ _ =
let hostid = int_of_string (q#param "hostid") in
template#set "id" (string_of_int hostid);
diff --git a/scripts/admin/edit_host_css.ml b/scripts/admin/edit_host_css.ml
index 8287fac..c891ba7 100644
--- a/scripts/admin/edit_host_css.ml
+++ b/scripts/admin/edit_host_css.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: edit_host_css.ml,v 1.3 2004/09/07 14:58:34 rich Exp $
+ * $Id: edit_host_css.ml,v 1.4 2004/09/09 09:35:35 rich Exp $
*)
open Apache
@@ -13,7 +13,7 @@ open Cocanwiki
open Cocanwiki_ok
open Cocanwiki_strings
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) _ _ _ =
let hostid = int_of_string (q#param "hostid") in
let css = q#param "css" in
diff --git a/scripts/admin/edit_host_css_form.ml b/scripts/admin/edit_host_css_form.ml
index 11a5e48..aac3e58 100644
--- a/scripts/admin/edit_host_css_form.ml
+++ b/scripts/admin/edit_host_css_form.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: edit_host_css_form.ml,v 1.3 2004/09/08 15:46:53 rich Exp $
+ * $Id: edit_host_css_form.ml,v 1.4 2004/09/09 09:35:35 rich Exp $
*)
open Apache
@@ -14,7 +14,7 @@ open Cocanwiki_template
let template = _get_template "admin/edit_host_css_form.html"
-let run r (q : cgi) (dbh : Dbi.connection) _ _ =
+let run r (q : cgi) (dbh : Dbi.connection) _ _ _ =
let hostid = int_of_string (q#param "hostid") in
template#set "id" (string_of_int hostid);
diff --git a/scripts/admin/edit_hostnames.ml b/scripts/admin/edit_hostnames.ml
index f572cb9..ffd35d9 100644
--- a/scripts/admin/edit_hostnames.ml
+++ b/scripts/admin/edit_hostnames.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: edit_hostnames.ml,v 1.3 2004/09/07 14:58:34 rich Exp $
+ * $Id: edit_hostnames.ml,v 1.4 2004/09/09 09:35:35 rich Exp $
*)
open Apache
@@ -15,11 +15,11 @@ open Cocanwiki_strings
let split_re = Pcre.regexp "[\\s,;]+"
-let run r (q : cgi) (dbh : Dbi.connection) host_stuff _ =
+let run r (q : cgi) (dbh : Dbi.connection) _ host' _ =
let hostid = int_of_string (q#param "hostid") in
if q#param_true "cancel" then (
- let _, hostname, _ = host_stuff in
+ let { hostname = hostname } = host' in
q#redirect ("http://" ^ hostname ^ "/_bin/admin/host.cmo?hostid=" ^
string_of_int hostid);
raise CgiExit
diff --git a/scripts/admin/edit_hostnames_form.ml b/scripts/admin/edit_hostnames_form.ml
index 2070b86..8b120b1 100644
--- a/scripts/admin/edit_hostnames_form.ml
+++ b/scripts/admin/edit_hostnames_form.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: edit_hostnames_form.ml,v 1.3 2004/09/08 15:46:53 rich Exp $
+ * $Id: edit_hostnames_form.ml,v 1.4 2004/09/09 09:35:35 rich Exp $
*)
open Apache
@@ -14,7 +14,7 @@ open Cocanwiki_template
let template = _get_template "admin/edit_hostnames_form.html"
-let run r (q : cgi) (dbh : Dbi.connection) _ _ =
+let run r (q : cgi) (dbh : Dbi.connection) _ _ _ =
let hostid = int_of_string (q#param "hostid") in
template#set "id" (string_of_int hostid);
diff --git a/scripts/admin/host.ml b/scripts/admin/host.ml
index 99b3bf2..b36c8dc 100644
--- a/scripts/admin/host.ml
+++ b/scripts/admin/host.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: host.ml,v 1.4 2004/09/08 15:46:53 rich Exp $
+ * $Id: host.ml,v 1.5 2004/09/09 09:35:35 rich Exp $
*)
open Apache
@@ -15,7 +15,7 @@ open Cocanwiki_date
let template = _get_template "admin/host.html"
-let run r (q : cgi) (dbh : Dbi.connection) _ _ =
+let run r (q : cgi) (dbh : Dbi.connection) _ _ _ =
let hostid = int_of_string (q#param "hostid") in
template#set "id" (string_of_int hostid);
diff --git a/scripts/cocanwiki.ml b/scripts/cocanwiki.ml
index 9df94a7..842917b 100644
--- a/scripts/cocanwiki.ml
+++ b/scripts/cocanwiki.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: cocanwiki.ml,v 1.4 2004/09/07 16:19:43 rich Exp $
+ * $Id: cocanwiki.ml,v 1.5 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -46,6 +46,10 @@ let test_permission edit_anon perm user =
let can_edit edit_anon = test_permission edit_anon CanEdit
let can_manage_users = test_permission false CanManageUsers
+(* The "host object". *)
+type host_t = { hostname : string;
+ edit_anon : bool; }
+
(* Our wrapper around the standard [register_script] function.
*
* The optional ~restrict and ~anonymous parameters work as follows:
@@ -96,6 +100,9 @@ let register_script ?(restrict = []) ?(anonymous = true) run =
failwith ("Hostname ``" ^ hostname ^ "'' not found in " ^
"the hosts/hostnames tables in the database.") in
+ (* Create the host object. *)
+ let host = { hostname = hostname; edit_anon = edit_anon; } in
+
(* Look for the user's cookie, and determine from this the user
* object.
*)
@@ -153,7 +160,7 @@ let register_script ?(restrict = []) ?(anonymous = true) run =
if permitted then (
(* Call the actual CGI script. *)
try
- run r q dbh (hostid, hostname, edit_anon) user
+ run r q dbh hostid host user
with
CgiExit -> ()
) else
diff --git a/scripts/create.ml b/scripts/create.ml
index c1f5f23..3da0560 100644
--- a/scripts/create.ml
+++ b/scripts/create.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: create.ml,v 1.3 2004/09/08 09:54:28 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
diff --git a/scripts/create_form.ml b/scripts/create_form.ml
index 1523fbc..75c9a33 100644
--- a/scripts/create_form.ml
+++ b/scripts/create_form.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: create_form.ml,v 1.4 2004/09/08 15:46:52 rich Exp $
+ * $Id: create_form.ml,v 1.5 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -15,7 +15,7 @@ open Cocanwiki
open Cocanwiki_template
open Cocanwiki_ok
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
let template = get_template dbh hostid "create_form.html" in
(* Get the page title. *)
diff --git a/scripts/delete_file.ml b/scripts/delete_file.ml
index 2efd82f..21847ec 100644
--- a/scripts/delete_file.ml
+++ b/scripts/delete_file.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: delete_file.ml,v 1.4 2004/09/08 09:54:28 rich Exp $
+ * $Id: delete_file.ml,v 1.5 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -13,7 +13,7 @@ open Cocanwiki
open Cocanwiki_ok
open Cocanwiki_emailnotify
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
let id = int_of_string (q#param "id") in
if q#param_true "yes" then (
diff --git a/scripts/delete_file_form.ml b/scripts/delete_file_form.ml
index 48c87cc..827c29f 100644
--- a/scripts/delete_file_form.ml
+++ b/scripts/delete_file_form.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: delete_file_form.ml,v 1.5 2004/09/08 15:46:52 rich Exp $
+ * $Id: delete_file_form.ml,v 1.6 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -12,7 +12,7 @@ open Printf
open Cocanwiki
open Cocanwiki_template
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let template = get_template dbh hostid "delete_file_form.html" in
let id = int_of_string (q#param "id") in
diff --git a/scripts/delete_image.ml b/scripts/delete_image.ml
index aa3bb1d..b112f96 100644
--- a/scripts/delete_image.ml
+++ b/scripts/delete_image.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: delete_image.ml,v 1.4 2004/09/08 09:54:28 rich Exp $
+ * $Id: delete_image.ml,v 1.5 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -13,7 +13,7 @@ open Cocanwiki
open Cocanwiki_ok
open Cocanwiki_emailnotify
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
let id = int_of_string (q#param "id") in
if q#param_true "yes" then (
diff --git a/scripts/delete_image_form.ml b/scripts/delete_image_form.ml
index d0d282f..f0624a2 100644
--- a/scripts/delete_image_form.ml
+++ b/scripts/delete_image_form.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: delete_image_form.ml,v 1.5 2004/09/08 15:46:52 rich Exp $
+ * $Id: delete_image_form.ml,v 1.6 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -12,7 +12,7 @@ open Printf
open Cocanwiki
open Cocanwiki_template
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let template = get_template dbh hostid "delete_image_form.html" in
let id = int_of_string (q#param "id") in
diff --git a/scripts/diff.ml b/scripts/diff.ml
index 4defd29..e94d5c8 100644
--- a/scripts/diff.ml
+++ b/scripts/diff.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: diff.ml,v 1.5 2004/09/08 15:46:52 rich Exp $
+ * $Id: diff.ml,v 1.6 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -13,7 +13,7 @@ open Cocanwiki
open Cocanwiki_template
open Cocanwiki_diff
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let template = get_template dbh hostid "diff.html" in
let page = q#param "page" in
diff --git a/scripts/edit.ml b/scripts/edit.ml
index 527db2a..effef45 100644
--- a/scripts/edit.ml
+++ b/scripts/edit.ml
@@ -1,7 +1,7 @@
(* 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 $
+ * $Id: edit.ml,v 1.7 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -30,7 +30,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 = hostname } _ =
let template = get_template dbh hostid "edit.html" in
let template_conflict = get_template dbh hostid "edit_conflict.html" in
diff --git a/scripts/edit_page_css.ml b/scripts/edit_page_css.ml
index 38da4a1..bef37af 100644
--- a/scripts/edit_page_css.ml
+++ b/scripts/edit_page_css.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: edit_page_css.ml,v 1.5 2004/09/08 13:09:05 rich Exp $
+ * $Id: edit_page_css.ml,v 1.6 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -15,7 +15,7 @@ open Cocanwiki_diff
open Cocanwiki_emailnotify
open Cocanwiki_strings
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
let page = q#param "page" in
let css = q#param "css" in
diff --git a/scripts/edit_page_css_form.ml b/scripts/edit_page_css_form.ml
index befceb0..ac8082d 100644
--- a/scripts/edit_page_css_form.ml
+++ b/scripts/edit_page_css_form.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: edit_page_css_form.ml,v 1.4 2004/09/08 15:46:53 rich Exp $
+ * $Id: edit_page_css_form.ml,v 1.5 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -12,7 +12,7 @@ open Printf
open Cocanwiki
open Cocanwiki_template
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let template = get_template dbh hostid "edit_page_css_form.html" in
let page = q#param "page" in
diff --git a/scripts/edit_sitemenu.ml b/scripts/edit_sitemenu.ml
index 36d48f7..798fe68 100644
--- a/scripts/edit_sitemenu.ml
+++ b/scripts/edit_sitemenu.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: edit_sitemenu.ml,v 1.2 2004/09/08 15:46:53 rich Exp $
+ * $Id: edit_sitemenu.ml,v 1.3 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -23,7 +23,7 @@ open Cocanwiki_strings
*)
type model_t = (string * string) list (* label, url *)
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
let template = get_template dbh hostid "edit_sitemenu.html" in
(* Workaround bugs in IE, specifically lack of support for
diff --git a/scripts/edit_user.ml b/scripts/edit_user.ml
index f549c0d..ec5ac31 100644
--- a/scripts/edit_user.ml
+++ b/scripts/edit_user.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: edit_user.ml,v 1.1 2004/09/08 12:45:38 rich Exp $
+ * $Id: edit_user.ml,v 1.2 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -13,7 +13,7 @@ open Cocanwiki
open Cocanwiki_strings
open Cocanwiki_ok
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) self =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ self =
let userid = int_of_string (q#param "userid") in
(* Get the user's original name. If we're going to change the
diff --git a/scripts/edit_user_form.ml b/scripts/edit_user_form.ml
index 9a08c8a..d98ed42 100644
--- a/scripts/edit_user_form.ml
+++ b/scripts/edit_user_form.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: edit_user_form.ml,v 1.2 2004/09/08 15:46:53 rich Exp $
+ * $Id: edit_user_form.ml,v 1.3 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -13,7 +13,7 @@ open Cocanwiki
open Cocanwiki_template
open Cocanwiki_date
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let template = get_template dbh hostid "edit_user_form.html" in
let userid = int_of_string (q#param "userid") in
diff --git a/scripts/file.ml b/scripts/file.ml
index 9b9f9a1..6ccd5d1 100644
--- a/scripts/file.ml
+++ b/scripts/file.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: file.ml,v 1.3 2004/09/07 14:58:34 rich Exp $
+ * $Id: file.ml,v 1.4 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -11,7 +11,7 @@ open Printf
open Cocanwiki
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let name = q#param "name" in
let version =
try Some (int_of_string (q#param "version")) with Not_found -> None in
diff --git a/scripts/files.ml b/scripts/files.ml
index c14d9df..cf1b96f 100644
--- a/scripts/files.ml
+++ b/scripts/files.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: files.ml,v 1.5 2004/09/08 15:46:53 rich Exp $
+ * $Id: files.ml,v 1.6 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -12,7 +12,7 @@ open Printf
open Cocanwiki
open Cocanwiki_template
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let template = get_template dbh hostid "files.html" in
let deleted = q#param_true "deleted" in
diff --git a/scripts/forgot_password.ml b/scripts/forgot_password.ml
index 6b99594..680a7bb 100644
--- a/scripts/forgot_password.ml
+++ b/scripts/forgot_password.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: forgot_password.ml,v 1.2 2004/09/08 09:13:02 rich Exp $
+ * $Id: forgot_password.ml,v 1.3 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -13,7 +13,7 @@ open Cocanwiki
open Cocanwiki_ok
open Cocanwiki_strings
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
let name = trim (q#param "name") in
if name = "" then (
diff --git a/scripts/forgot_password_form.ml b/scripts/forgot_password_form.ml
index 1e5b733..df7e69c 100644
--- a/scripts/forgot_password_form.ml
+++ b/scripts/forgot_password_form.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: forgot_password_form.ml,v 1.2 2004/09/08 15:46:53 rich Exp $
+ * $Id: forgot_password_form.ml,v 1.3 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -12,7 +12,7 @@ open Printf
open Cocanwiki
open Cocanwiki_template
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let template = get_template dbh hostid "forgot_password_form.html" in
q#template template
diff --git a/scripts/history.ml b/scripts/history.ml
index 186822e..bd149e2 100644
--- a/scripts/history.ml
+++ b/scripts/history.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: history.ml,v 1.5 2004/09/08 15:46:53 rich Exp $
+ * $Id: history.ml,v 1.6 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -13,7 +13,7 @@ open Cocanwiki
open Cocanwiki_template
open Cocanwiki_date
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let template = get_template dbh hostid "history.html" in
let page = q#param "page" in
diff --git a/scripts/hoststyle.ml b/scripts/hoststyle.ml
index 32f92f9..7a16885 100644
--- a/scripts/hoststyle.ml
+++ b/scripts/hoststyle.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: hoststyle.ml,v 1.2 2004/09/07 13:40:10 rich Exp $
+ * $Id: hoststyle.ml,v 1.3 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -12,7 +12,7 @@ open Printf
open Cocanwiki
open Cocanwiki_template
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
(* Get the CSS. *)
let sth = dbh#prepare_cached "select css from hosts where id = ?" in
sth#execute [`Int hostid];
diff --git a/scripts/image.ml b/scripts/image.ml
index e81165d..5907329 100644
--- a/scripts/image.ml
+++ b/scripts/image.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: image.ml,v 1.3 2004/09/07 14:58:34 rich Exp $
+ * $Id: image.ml,v 1.4 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -11,7 +11,7 @@ open Printf
open Cocanwiki
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let image = q#param "image" in
let is_thumbnail = q#param_true "thumbnail" in
let version =
diff --git a/scripts/images.ml b/scripts/images.ml
index 95bbb81..69703cd 100644
--- a/scripts/images.ml
+++ b/scripts/images.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: images.ml,v 1.5 2004/09/08 15:46:53 rich Exp $
+ * $Id: images.ml,v 1.6 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -12,7 +12,7 @@ open Printf
open Cocanwiki
open Cocanwiki_template
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let template = get_template dbh hostid "images.html" in
let deleted = q#param_true "deleted" in
diff --git a/scripts/login.ml b/scripts/login.ml
index 84829be..533054d 100644
--- a/scripts/login.ml
+++ b/scripts/login.ml
@@ -1,7 +1,7 @@
(* Easy Web Pages (EWP) scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: login.ml,v 1.1 2004/09/07 16:19:43 rich Exp $
+ * $Id: login.ml,v 1.2 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -14,7 +14,7 @@ open Cocanwiki_ok
let expires = "Wed, 18-May-2033 04:33:20 GMT"
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let username = q#param "username" in
let password = q#param "password" in
let permanent = try "1" = q#param "permanent" with Not_found -> false in
diff --git a/scripts/login_form.ml b/scripts/login_form.ml
index b16921f..1c4593e 100644
--- a/scripts/login_form.ml
+++ b/scripts/login_form.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: login_form.ml,v 1.2 2004/09/08 15:46:53 rich Exp $
+ * $Id: login_form.ml,v 1.3 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -13,7 +13,7 @@ open Cocanwiki
open Cocanwiki_template
open Cocanwiki_strings
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let template = get_template dbh hostid "login_form.html" in
let redirect = try q#param "redirect" with Not_found -> "" in
diff --git a/scripts/logout.ml b/scripts/logout.ml
index 2386493..11b9210 100644
--- a/scripts/logout.ml
+++ b/scripts/logout.ml
@@ -1,7 +1,7 @@
(* Easy Web Pages (EWP) scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: logout.ml,v 1.1 2004/09/07 16:19:43 rich Exp $
+ * $Id: logout.ml,v 1.2 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -14,7 +14,7 @@ open Cocanwiki_ok
let expires = "Sun, 09-Sep-2001 02:46:40 GMT"
-let run r (q : cgi) (dbh : Dbi.connection) _ user =
+let run r (q : cgi) (dbh : Dbi.connection) _ _ user =
(* The logout function removes all of the associated cookies from the
* database. This isn't required, but is nice semantics, and also helps
* to reduce the size of the usercookies table in the database.
diff --git a/scripts/page.ml b/scripts/page.ml
index c0979f0..0f85ca8 100644
--- a/scripts/page.ml
+++ b/scripts/page.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: page.ml,v 1.9 2004/09/08 17:07:24 rich Exp $
+ * $Id: page.ml,v 1.10 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -23,7 +23,7 @@ type fp_status = FPOK of int * string * string * Dbi.datetime * bool
| FPRedirect of string
| FPNotFound
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, edit_anon) user =
+let run r (q : cgi) (dbh : Dbi.connection) hostid {edit_anon=edit_anon} user =
let template_page = get_template dbh hostid "page.html" in
let template_404 = get_template dbh hostid "page_404.html" in
diff --git a/scripts/pagestyle.ml b/scripts/pagestyle.ml
index 0404d18..7036454 100644
--- a/scripts/pagestyle.ml
+++ b/scripts/pagestyle.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: pagestyle.ml,v 1.2 2004/09/07 13:40:10 rich Exp $
+ * $Id: pagestyle.ml,v 1.3 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -11,7 +11,7 @@ open Printf
open Cocanwiki
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let page = q#param "page" in
let version =
try Some (int_of_string (q#param "version")) with Not_found -> None in
diff --git a/scripts/preview.ml b/scripts/preview.ml
index 3bd28b2..18e867c 100644
--- a/scripts/preview.ml
+++ b/scripts/preview.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: preview.ml,v 1.2 2004/09/07 13:40:10 rich Exp $
+ * $Id: preview.ml,v 1.3 2004/09/09 09:35:33 rich Exp $
*
* In case you were wondering, this script is called from the Javascript
* to update the preview . See /_js/editor.js for details.
@@ -14,7 +14,7 @@ open Printf
open Cocanwiki
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let content = q#param "content" in
let xhtml = Wikilib.xhtml_of_content dbh hostid content in
diff --git a/scripts/recent.ml b/scripts/recent.ml
index bf75ab2..786dd99 100644
--- a/scripts/recent.ml
+++ b/scripts/recent.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: recent.ml,v 1.5 2004/09/08 15:46:53 rich Exp $
+ * $Id: recent.ml,v 1.6 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -15,7 +15,7 @@ open Cocanwiki_date
let max_age = "3 months"
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let template = get_template dbh hostid "recent.html" in
let sth =
diff --git a/scripts/restore.ml b/scripts/restore.ml
index 47f3cf9..c1a93d1 100644
--- a/scripts/restore.ml
+++ b/scripts/restore.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: restore.ml,v 1.5 2004/09/08 13:09:05 rich Exp $
+ * $Id: restore.ml,v 1.6 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -14,7 +14,7 @@ open Cocanwiki_ok
open Cocanwiki_diff
open Cocanwiki_emailnotify
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
let version = int_of_string (q#param "version") in
let page = q#param "page" in
diff --git a/scripts/restore_form.ml b/scripts/restore_form.ml
index 99ab121..4eb681b 100644
--- a/scripts/restore_form.ml
+++ b/scripts/restore_form.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: restore_form.ml,v 1.5 2004/09/08 15:46:53 rich Exp $
+ * $Id: restore_form.ml,v 1.6 2004/09/09 09:35:33 rich Exp $
*)
open Apache
@@ -14,7 +14,7 @@ open Cocanwiki_template
open Cocanwiki_ok
open Cocanwiki_diff
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let template = get_template dbh hostid "restore_form.html" in
(* Parameters. *)
diff --git a/scripts/search.ml b/scripts/search.ml
index 3288ccf..852402b 100644
--- a/scripts/search.ml
+++ b/scripts/search.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: search.ml,v 1.2 2004/09/07 13:40:10 rich Exp $
+ * $Id: search.ml,v 1.3 2004/09/09 09:35:34 rich Exp $
*)
open Apache
@@ -15,7 +15,7 @@ open Cocanwiki
let search : ('a -> 'b -> 'c, unit, string, string) format4 =
"http://www.google.com/search?q=site:%s+%s"
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
let query = q#param "q" in
let query = sprintf search (escape_url hostname) (escape_url query) in
diff --git a/scripts/signup.ml b/scripts/signup.ml
index d16acb1..70280f0 100644
--- a/scripts/signup.ml
+++ b/scripts/signup.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: signup.ml,v 1.3 2004/09/08 12:45:38 rich Exp $
+ * $Id: signup.ml,v 1.4 2004/09/09 09:35:34 rich Exp $
*)
open Apache
@@ -13,7 +13,7 @@ open Cocanwiki
open Cocanwiki_ok
open Cocanwiki_strings
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
(* Verify that we're allowed to create accounts anonymously
* on this host.
*)
diff --git a/scripts/sitemap.ml b/scripts/sitemap.ml
index c8914d5..b69f58d 100644
--- a/scripts/sitemap.ml
+++ b/scripts/sitemap.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: sitemap.ml,v 1.4 2004/09/08 15:46:53 rich Exp $
+ * $Id: sitemap.ml,v 1.5 2004/09/09 09:35:34 rich Exp $
*)
open Apache
@@ -14,7 +14,7 @@ open Cocanwiki_template
open Cocanwiki_date
open Cocanwiki_strings
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
let template = get_template dbh hostid "sitemap.html" in
(* Pull out all the current pages, and a bit of content from each. *)
diff --git a/scripts/undelete_file.ml b/scripts/undelete_file.ml
index 8be78f6..91cd8d0 100644
--- a/scripts/undelete_file.ml
+++ b/scripts/undelete_file.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: undelete_file.ml,v 1.4 2004/09/08 09:54:28 rich Exp $
+ * $Id: undelete_file.ml,v 1.5 2004/09/09 09:35:34 rich Exp $
*)
open Apache
@@ -13,7 +13,7 @@ open Cocanwiki
open Cocanwiki_template
open Cocanwiki_ok
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
let id = int_of_string (q#param "id") in
if q#param_true "yes" then (
diff --git a/scripts/undelete_file_form.ml b/scripts/undelete_file_form.ml
index ef534c2..363e0da 100644
--- a/scripts/undelete_file_form.ml
+++ b/scripts/undelete_file_form.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: undelete_file_form.ml,v 1.5 2004/09/08 15:46:53 rich Exp $
+ * $Id: undelete_file_form.ml,v 1.6 2004/09/09 09:35:34 rich Exp $
*)
open Apache
@@ -12,7 +12,7 @@ open Printf
open Cocanwiki
open Cocanwiki_template
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let template = get_template dbh hostid "undelete_file_form.html" in
let id = int_of_string (q#param "id") in
diff --git a/scripts/undelete_image.ml b/scripts/undelete_image.ml
index fbce7bf..6657e55 100644
--- a/scripts/undelete_image.ml
+++ b/scripts/undelete_image.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: undelete_image.ml,v 1.4 2004/09/08 09:54:28 rich Exp $
+ * $Id: undelete_image.ml,v 1.5 2004/09/09 09:35:34 rich Exp $
*)
open Apache
@@ -13,7 +13,7 @@ open Cocanwiki
open Cocanwiki_template
open Cocanwiki_ok
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
let id = int_of_string (q#param "id") in
if q#param_true "yes" then (
diff --git a/scripts/undelete_image_form.ml b/scripts/undelete_image_form.ml
index 94ba133..f0a8258 100644
--- a/scripts/undelete_image_form.ml
+++ b/scripts/undelete_image_form.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: undelete_image_form.ml,v 1.5 2004/09/08 15:46:53 rich Exp $
+ * $Id: undelete_image_form.ml,v 1.6 2004/09/09 09:35:34 rich Exp $
*)
open Apache
@@ -12,7 +12,7 @@ open Printf
open Cocanwiki
open Cocanwiki_template
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let template = get_template dbh hostid "undelete_image_form.html" in
let id = int_of_string (q#param "id") in
diff --git a/scripts/upload_file.ml b/scripts/upload_file.ml
index bca6237..3e500c7 100644
--- a/scripts/upload_file.ml
+++ b/scripts/upload_file.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: upload_file.ml,v 1.4 2004/09/08 09:54:28 rich Exp $
+ * $Id: upload_file.ml,v 1.5 2004/09/09 09:35:34 rich Exp $
*)
open Apache
@@ -23,7 +23,7 @@ let is_whitespace str = Pcre.pmatch ~rex:is_ws_re str
(* Valid file names. *)
let file_ok_re = Pcre.regexp "^[a-z0-9][-._a-z0-9]*$"
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
let name = q#param "name" in
let title = q#param "title" in
diff --git a/scripts/upload_file_form.ml b/scripts/upload_file_form.ml
index 8e4d207..bd30743 100644
--- a/scripts/upload_file_form.ml
+++ b/scripts/upload_file_form.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: upload_file_form.ml,v 1.5 2004/09/08 15:46:53 rich Exp $
+ * $Id: upload_file_form.ml,v 1.6 2004/09/09 09:35:34 rich Exp $
*)
open Apache
@@ -12,7 +12,7 @@ open Printf
open Cocanwiki
open Cocanwiki_template
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let template = get_template dbh hostid "upload_file_form.html" in
q#template template
diff --git a/scripts/upload_image.ml b/scripts/upload_image.ml
index c22fa45..9277dbd 100644
--- a/scripts/upload_image.ml
+++ b/scripts/upload_image.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: upload_image.ml,v 1.4 2004/09/08 09:54:28 rich Exp $
+ * $Id: upload_image.ml,v 1.5 2004/09/09 09:35:34 rich Exp $
*)
open Apache
@@ -22,7 +22,7 @@ let is_whitespace str = Pcre.pmatch ~rex:is_ws_re str
(* Valid image names. *)
let image_ok_re = Pcre.regexp "^[a-z0-9][_a-z0-9]*\\.(jpg|jpeg|gif|ico|png)$"
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ =
let name = q#param "name" in
let alt = q#param "alt" in
let title = q#param "title" in
diff --git a/scripts/upload_image_form.ml b/scripts/upload_image_form.ml
index 53ad2b4..2627d86 100644
--- a/scripts/upload_image_form.ml
+++ b/scripts/upload_image_form.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: upload_image_form.ml,v 1.5 2004/09/08 15:46:53 rich Exp $
+ * $Id: upload_image_form.ml,v 1.6 2004/09/09 09:35:34 rich Exp $
*)
open Apache
@@ -12,7 +12,7 @@ open Printf
open Cocanwiki
open Cocanwiki_template
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let template = get_template dbh hostid "upload_image_form.html" in
q#template template
diff --git a/scripts/users.ml b/scripts/users.ml
index e36c836..057e707 100644
--- a/scripts/users.ml
+++ b/scripts/users.ml
@@ -1,7 +1,7 @@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones .
* Copyright (C) 2004 Merjis Ltd.
- * $Id: users.ml,v 1.2 2004/09/08 15:46:53 rich Exp $
+ * $Id: users.ml,v 1.3 2004/09/09 09:35:34 rich Exp $
*)
open Apache
@@ -13,7 +13,7 @@ open Cocanwiki
open Cocanwiki_template
open Cocanwiki_date
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let template = get_template dbh hostid "users.html" in
let sth =
diff --git a/templates/create_form.html b/templates/create_form.html
index 51aa086..049235f 100644
--- a/templates/create_form.html
+++ b/templates/create_form.html
@@ -4,7 +4,7 @@
This page does not exist yet
-
+
@@ -46,10 +46,24 @@ content for that page.
+
+
+
+
diff --git a/templates/delete_file_form.html b/templates/delete_file_form.html
index e51e726..ae99638 100644
--- a/templates/delete_file_form.html
+++ b/templates/delete_file_form.html
@@ -3,7 +3,7 @@
Delete file
-
+
Delete file
@@ -30,14 +30,16 @@ Name: ::name_html::
diff --git a/templates/delete_image_form.html b/templates/delete_image_form.html
index e4cd9dd..42b68fd 100644
--- a/templates/delete_image_form.html
+++ b/templates/delete_image_form.html
@@ -3,7 +3,7 @@
Delete image
-
+
Delete image
@@ -28,14 +28,16 @@ Are you sure you want to delete this image?
diff --git a/templates/diff.html b/templates/diff.html
index 81a26e3..600f439 100644
--- a/templates/diff.html
+++ b/templates/diff.html
@@ -3,7 +3,7 @@
Diff
-
+
Diff
@@ -26,14 +26,16 @@ Differences between
diff --git a/templates/edit.html b/templates/edit.html
index 511319d..927a13a 100644
--- a/templates/edit.html
+++ b/templates/edit.html
@@ -77,7 +77,8 @@ update_preview_now ('content_::ordering::', 'preview_::ordering::');
Edit stylesheet for this page
@@ -31,14 +31,16 @@ Editing the stylesheet for ::page_html:: :
@@ -46,10 +46,24 @@
+
+
+
+
@@ -59,14 +59,16 @@ Name: ::name_html:: (size: ::ksize_html:: K)
@@ -39,14 +39,16 @@ username or email address on record, we will email you your password.
Versions of this page
@@ -28,14 +28,16 @@
@@ -61,14 +61,16 @@ ALT text: ::alt_html::
@@ -97,14 +97,16 @@ account for you.
@@ -77,7 +77,7 @@
diff --git a/templates/page_404.html b/templates/page_404.html
index 6ffc2e2..8849e58 100644
--- a/templates/page_404.html
+++ b/templates/page_404.html
@@ -4,7 +4,7 @@
Page not found
-
+
::if(has_host_css):: ::end::
@@ -24,9 +24,7 @@ Search our site for this page:
diff --git a/templates/edit_conflict.html b/templates/edit_conflict.html
index 234c347..d176c57 100644
--- a/templates/edit_conflict.html
+++ b/templates/edit_conflict.html
@@ -44,7 +44,8 @@ to an edit conflict which you have to fix by hand.
diff --git a/templates/edit_page_css_form.html b/templates/edit_page_css_form.html
index 1583488..59e8b81 100644
--- a/templates/edit_page_css_form.html
+++ b/templates/edit_page_css_form.html
@@ -3,7 +3,7 @@
diff --git a/templates/edit_sitemenu.html b/templates/edit_sitemenu.html
index 30f9608..cf78141 100644
--- a/templates/edit_sitemenu.html
+++ b/templates/edit_sitemenu.html
@@ -4,7 +4,7 @@
diff --git a/templates/files.html b/templates/files.html
index 5a68ae0..4b009fc 100644
--- a/templates/files.html
+++ b/templates/files.html
@@ -3,7 +3,7 @@
diff --git a/templates/forgot_password_form.html b/templates/forgot_password_form.html
index 81d0633..befd424 100644
--- a/templates/forgot_password_form.html
+++ b/templates/forgot_password_form.html
@@ -4,7 +4,7 @@
diff --git a/templates/history.html b/templates/history.html
index 72c4331..1062cb2 100644
--- a/templates/history.html
+++ b/templates/history.html
@@ -4,7 +4,7 @@
diff --git a/templates/images.html b/templates/images.html
index 68fcef6..9f6e09b 100644
--- a/templates/images.html
+++ b/templates/images.html
@@ -3,7 +3,7 @@
diff --git a/templates/login_form.html b/templates/login_form.html
index c66eeb0..92f7cd8 100644
--- a/templates/login_form.html
+++ b/templates/login_form.html
@@ -4,7 +4,7 @@
diff --git a/templates/page.html b/templates/page.html
index 77a4353..22bfbd1 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -5,7 +5,7 @@
::if(is_old_version):: ::end::
-
+
::if(has_host_css):: ::end::
::if(has_page_css):: ::end::