Added the navigation box (see email).
[cocanwiki.git] / scripts / edit_host_settings_form.ml
index 3153e00..d6932bb 100644 (file)
@@ -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.
- * $Id: edit_host_settings_form.ml,v 1.1 2004/09/22 12:04:28 rich Exp $
+ * $Id: edit_host_settings_form.ml,v 1.5 2004/10/10 16:14:43 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,29 +44,35 @@ 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
+              feedback_email, mailing_list, search_box, navigation, view_anon
          from hosts where id = ?" in
   sth#execute [`Int hostid];
 
   let canonical_hostname, edit_anon, create_account_anon, theme_css,
-      feedback_email =
+      feedback_email, mailing_list, search_box, navigation, view_anon =
     match sth#fetch1 () with
        [ `String canonical_hostname;
          `Bool edit_anon; `Bool create_account_anon;
          (`String _ | `Null) as theme_css;
-         (`String _ | `Null) as feedback_email ] ->
+         (`String _ | `Null) as feedback_email;
+         `Bool mailing_list; `Bool search_box; `Bool navigation;
+         `Bool view_anon ] ->
          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
+         feedback_email, mailing_list, search_box, navigation, view_anon
       | _ -> assert false in
 
   template#set "canonical_hostname" canonical_hostname;
   template#conditional "edit_anon" edit_anon;
   template#conditional "create_account_anon" create_account_anon;
   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;
 
   (* Themes table. *)
   let table =