X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=scripts%2Fhost_menu.ml;h=8dd3462e159b328646eee7ce282d84de50bfe007;hb=247bf3832dcd02aae202dcb706ac20458f6ab1f1;hp=ee67282c90e4b037f26e2ba0ea3cd11f1077816b;hpb=df32ab1d0dd164b73cfa9607797eaf85e0a0154d;p=cocanwiki.git diff --git a/scripts/host_menu.ml b/scripts/host_menu.ml index ee67282..8dd3462 100644 --- a/scripts/host_menu.ml +++ b/scripts/host_menu.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: host_menu.ml,v 1.3 2004/09/27 16:21:09 rich Exp $ + * $Id: host_menu.ml,v 1.4 2004/10/04 15:19:56 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 @@ -36,21 +36,21 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = "select h.canonical_hostname, h.css is not null, h.edit_anon, h.create_account_anon, h.theme_css is not null, t.name, t.description, h.feedback_email, h.mailing_list, - h.search_box + h.search_box, h.view_anon from hosts h left outer join themes t on h.theme_css = t.theme_css where h.id = ?" in sth#execute [`Int hostid]; let canonical_hostname, has_global_css, edit_anon, create_account_anon, has_theme_css, theme_name, theme_description, has_feedback_email, - feedback_email, mailing_list, search_box = + feedback_email, mailing_list, search_box, view_anon = match sth#fetch1 () with [ `String canonical_hostname; `Bool has_global_css; `Bool edit_anon; `Bool create_account_anon; `Bool has_theme_css; (`String _ | `Null) as theme_name; (`String _ | `Null) as theme_description; (`String _ | `Null) as feedback_email; - `Bool mailing_list; `Bool search_box ] -> + `Bool mailing_list; `Bool search_box; `Bool view_anon ] -> let theme_name = match theme_name with `String s -> s | `Null -> "" in let theme_description = @@ -61,7 +61,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = | `Null -> "", false in canonical_hostname, has_global_css, edit_anon, create_account_anon, has_theme_css, theme_name, theme_description, has_feedback_email, - feedback_email, mailing_list, search_box + feedback_email, mailing_list, search_box, view_anon | _ -> assert false in template#set "canonical_hostname" canonical_hostname; @@ -75,6 +75,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = template#set "feedback_email" feedback_email; template#conditional "mailing_list" mailing_list; template#conditional "search_box" search_box; + template#conditional "view_anon" view_anon; q#template template