X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=scripts%2Fedit_host_settings_form.ml;h=553e7d2bd01e7dd2d8effd95d3641ece367d65a0;hb=0d913c7fee349ac0d46a9f9ce31977b2e5c545af;hp=3da216ebfb7eb1dbb3676ace1e405ba31ea0cf6f;hpb=50799fee9a4c3906fe0ab9988df83af2109fa269;p=cocanwiki.git diff --git a/scripts/edit_host_settings_form.ml b/scripts/edit_host_settings_form.ml index 3da216e..553e7d2 100644 --- a/scripts/edit_host_settings_form.ml +++ b/scripts/edit_host_settings_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_host_settings_form.ml,v 1.4 2004/10/04 15:19:56 rich Exp $ + * $Id: edit_host_settings_form.ml,v 1.6 2004/11/03 13:36:45 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 @@ -44,24 +44,30 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = let sth = dbh#prepare_cached "select canonical_hostname, edit_anon, create_account_anon, theme_css, - feedback_email, mailing_list, search_box, view_anon + feedback_email, mailing_list, search_box, navigation, view_anon, + coalesce (brand, ''), coalesce (brand_tagline, ''), + coalesce (brand_description, '') from hosts where id = ?" in sth#execute [`Int hostid]; let canonical_hostname, edit_anon, create_account_anon, theme_css, - feedback_email, mailing_list, search_box, view_anon = + feedback_email, mailing_list, search_box, navigation, view_anon, + brand, brand_tagline, brand_description = match sth#fetch1 () with [ `String canonical_hostname; `Bool edit_anon; `Bool create_account_anon; (`String _ | `Null) as theme_css; (`String _ | `Null) as feedback_email; - `Bool mailing_list; `Bool search_box; `Bool view_anon ] -> + `Bool mailing_list; `Bool search_box; `Bool navigation; + `Bool view_anon; + `String brand; `String brand_tagline; `String brand_description ] -> let theme_css = match theme_css with `String s -> s | `Null -> "" in let feedback_email = match feedback_email with `String s -> s | `Null -> "" in canonical_hostname, edit_anon, create_account_anon, theme_css, - feedback_email, mailing_list, search_box, view_anon + feedback_email, mailing_list, search_box, navigation, view_anon, + brand, brand_tagline, brand_description | _ -> assert false in template#set "canonical_hostname" canonical_hostname; @@ -70,7 +76,11 @@ 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 "navigation" navigation; template#conditional "view_anon" view_anon; + template#set "brand" brand; + template#set "brand_tagline" brand_tagline; + template#set "brand_description" brand_description; (* Themes table. *) let table =