(* COCANWIKI scripts.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: edit_hostnames.ml,v 1.1 2004/09/07 10:14:10 rich Exp $
+ * $Id: edit_hostnames.ml,v 1.3 2004/09/07 14:58:34 rich Exp $
*)
open Apache
open Cgi
open Printf
-open Merjisforwiki
-
open Cocanwiki
open Cocanwiki_ok
+open Cocanwiki_strings
let split_re = Pcre.regexp "[\\s,;]+"
-let run r (q : cgi) (dbh : Dbi.connection) hostid_hostname _ =
+let run r (q : cgi) (dbh : Dbi.connection) host_stuff _ =
let hostid = int_of_string (q#param "hostid") in
if q#param_true "cancel" then (
- let _, hostname = hostid_hostname in
+ let _, hostname, _ = host_stuff in
q#redirect ("http://" ^ hostname ^ "/_bin/admin/host.cmo?hostid=" ^
string_of_int hostid);
raise CgiExit