X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=scripts%2Fedit_host_settings.ml;h=fd85e175be4121e4d1aad2083bf48659ee8bb9d3;hb=2b332786c6f216c5e2e72cc1596ba4c66b5aa2a4;hp=d743865370dd49b742111d188c8255daf2791ea1;hpb=7f5eacecb9a0353de411c82bd35caf21f5a73060;p=cocanwiki.git diff --git a/scripts/edit_host_settings.ml b/scripts/edit_host_settings.ml index d743865..fd85e17 100644 --- a/scripts/edit_host_settings.ml +++ b/scripts/edit_host_settings.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.ml,v 1.1 2004/09/22 12:04:28 rich Exp $ + * $Id: edit_host_settings.ml,v 1.4 2004/09/27 16:21:09 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 @@ -32,7 +32,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ = if q#param_true "cancel" then ( (* Request cancelled. *) q#redirect ("http://" ^ hostname ^ "/_bin/host_menu.cmo"); - raise CgiExit + return () ); (* Get parameters. *) @@ -40,6 +40,8 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ = let create_account_anon = q#param_true "create_account_anon" in let theme_css = q#param "theme_css" in let feedback_email = q#param "feedback_email" in + let mailing_list = q#param_true "mailing_list" in + let search_box = q#param_true "search_box" in let theme_css = if theme_css = "" then `Null else `String theme_css in let feedback_email = @@ -48,10 +50,11 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid { hostname = hostname } _ = (* Update the database. *) let sth = dbh#prepare_cached "update hosts set edit_anon = ?, create_account_anon = ?, theme_css = ?, - feedback_email = ? + feedback_email = ?, mailing_list = ?, + search_box = ? where id = ?" in sth#execute [`Bool edit_anon; `Bool create_account_anon; - theme_css; feedback_email; + theme_css; feedback_email; `Bool mailing_list; `Bool search_box; `Int hostid]; dbh#commit ();