(* 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.ml,v 1.7 2004/11/03 13:36:45 rich Exp $
+ * $Id: edit_host_settings.ml,v 1.9 2005/11/24 14:54:11 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
let brand = trim (q#param "brand") in
let brand_tagline = trim (q#param "brand_tagline") in
let brand_description = trim (q#param "brand_description") in
+ let pagebug = trim (q#param "pagebug") in
let theme_css = if theme_css = "" then `Null else `String theme_css in
let feedback_email =
if brand_tagline = "" then `Null else `String brand_tagline in
let brand_description =
if brand_description = "" then `Null else `String brand_description in
+ let pagebug =
+ if pagebug = "" then `Null else `String pagebug in
(* Update the database. *)
let sth = dbh#prepare_cached "update hosts set edit_anon = ?,
search_box = ?, navigation = ?,
view_anon = ?,
brand = ?, brand_tagline = ?,
- brand_description = ?
+ brand_description = ?,
+ pagebug = ?
where id = ?" in
sth#execute [`Bool edit_anon; `Bool create_account_anon;
theme_css; feedback_email; `Bool mailing_list; `Bool search_box;
`Bool navigation; `Bool view_anon;
brand; brand_tagline; brand_description;
+ pagebug;
`Int hostid];
dbh#commit ();
(* Finish off. *)
ok ~title:"Global settings updated"
~buttons:[ok_button "/_bin/host_menu.cmo"]
- q "The global settings were updated."
+ dbh hostid q "The global settings were updated."
let () =
register_script ~restrict:[CanManageSite] run