git.annexia.org
/
cocanwiki.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Contact form now identified by name, not ID field.
[cocanwiki.git]
/
scripts
/
edit_user_form.ml
diff --git
a/scripts/edit_user_form.ml
b/scripts/edit_user_form.ml
index
8670da4
..
26e0a2f
100644
(file)
--- a/
scripts/edit_user_form.ml
+++ b/
scripts/edit_user_form.ml
@@
-1,7
+1,7
@@
(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: edit_user_form.ml,v 1.
4 2004/09/09 12:21:22
rich Exp $
+ * $Id: edit_user_form.ml,v 1.
6 2004/09/22 10:19:26
rich Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-36,21
+36,25
@@
let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
let sth =
dbh#prepare_cached
"select u.name, u.email, u.registration_date,
let sth =
dbh#prepare_cached
"select u.name, u.email, u.registration_date,
- u.can_edit, u.can_manage_users,
+ u.can_edit, u.can_manage_users, u.can_manage_contacts,
+ u.can_manage_site, u.can_edit_global_css,
(select count(*) from pages where logged_user = u.id),
(select count(*) from pages
where logged_user = u.id and url_deleted is null)
from users u where u.hostid = ? and u.id = ?" in
sth#execute [`Int hostid; `Int userid];
(select count(*) from pages where logged_user = u.id),
(select count(*) from pages
where logged_user = u.id and url_deleted is null)
from users u where u.hostid = ? and u.id = ?" in
sth#execute [`Int hostid; `Int userid];
- let name, email, registration_date, can_edit, can_manage_users, nr_edits,
- nr_edits_live =
+ let name, email, registration_date, can_edit, can_manage_users,
+ can_manage_contacts, can_manage_site, can_edit_global_css,
+ nr_edits, nr_edits_live =
match sth#fetch1 () with
[`String name; (`Null | `String _) as email;
`Date registration_date;
match sth#fetch1 () with
[`String name; (`Null | `String _) as email;
`Date registration_date;
- `Bool can_edit; `Bool can_manage_users;
+ `Bool can_edit; `Bool can_manage_users; `Bool can_manage_contacts;
+ `Bool can_manage_site; `Bool can_edit_global_css;
`Int nr_edits; `Int nr_edits_live] ->
name, email, registration_date, can_edit, can_manage_users,
`Int nr_edits; `Int nr_edits_live] ->
name, email, registration_date, can_edit, can_manage_users,
+ can_manage_contacts, can_manage_site, can_edit_global_css,
nr_edits, nr_edits_live
| _ -> assert false in
nr_edits, nr_edits_live
| _ -> assert false in
@@
-60,6
+64,9
@@
let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
template#set "registration_date" (printable_date' registration_date);
template#conditional "can_edit" can_edit;
template#conditional "can_manage_users" can_manage_users;
template#set "registration_date" (printable_date' registration_date);
template#conditional "can_edit" can_edit;
template#conditional "can_manage_users" can_manage_users;
+ template#conditional "can_manage_contacts" can_manage_contacts;
+ template#conditional "can_manage_site" can_manage_site;
+ template#conditional "can_edit_global_css" can_edit_global_css;
template#set "nr_edits" (string_of_int nr_edits);
template#set "nr_edits_live" (string_of_int nr_edits_live);
template#set "nr_edits" (string_of_int nr_edits);
template#set "nr_edits_live" (string_of_int nr_edits_live);