X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=scripts%2Fedit_user_form.ml;h=d8eb82afabf56bda4d75aa7aaad69755ba6f0bb4;hb=10d8720cc7d9cfcaacbf61dadb56dd85ca497343;hp=95740818ca25ce7a646d934e8416d889b0b059f3;hpb=5def59b20559a1d352d0d9c3304d9b09c2523b41;p=cocanwiki.git diff --git a/scripts/edit_user_form.ml b/scripts/edit_user_form.ml index 9574081..d8eb82a 100644 --- 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 . * Copyright (C) 2004 Merjis Ltd. - * $Id: edit_user_form.ml,v 1.5 2004/09/17 15:24:54 rich Exp $ + * $Id: edit_user_form.ml,v 1.7 2004/10/11 14:13:04 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 @@ -37,6 +37,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = dbh#prepare_cached "select u.name, u.email, u.registration_date, u.can_edit, u.can_manage_users, u.can_manage_contacts, + u.can_manage_site, u.can_edit_global_css, u.can_import_mail, (select count(*) from pages where logged_user = u.id), (select count(*) from pages where logged_user = u.id and url_deleted is null) @@ -44,14 +45,18 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = sth#execute [`Int hostid; `Int userid]; let name, email, registration_date, can_edit, can_manage_users, - can_manage_contacts, nr_edits, nr_edits_live = + can_manage_contacts, can_manage_site, can_edit_global_css, + can_import_mail, nr_edits, nr_edits_live = match sth#fetch1 () with [`String name; (`Null | `String _) as email; `Date registration_date; `Bool can_edit; `Bool can_manage_users; `Bool can_manage_contacts; + `Bool can_manage_site; `Bool can_edit_global_css; + `Bool can_import_mail; `Int nr_edits; `Int nr_edits_live] -> name, email, registration_date, can_edit, can_manage_users, - can_manage_contacts, nr_edits, nr_edits_live + can_manage_contacts, can_manage_site, can_edit_global_css, + can_import_mail, nr_edits, nr_edits_live | _ -> assert false in template#set "userid" (string_of_int userid); @@ -61,6 +66,9 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = 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#conditional "can_import_mail" can_import_mail; template#set "nr_edits" (string_of_int nr_edits); template#set "nr_edits_live" (string_of_int nr_edits_live);