This code needs rewriting. Add a comment to that effect.
authorrich <rich>
Mon, 11 Sep 2006 09:39:33 +0000 (09:39 +0000)
committerrich <rich>
Mon, 11 Sep 2006 09:39:33 +0000 (09:39 +0000)
The code also doesn't correctly copy macros.

scripts/lib/cocanwiki_create_host.ml

index f83f2ee..81e8c3b 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: cocanwiki_create_host.ml,v 1.7 2006/08/17 09:11:31 rich Exp $
+ * $Id: cocanwiki_create_host.ml,v 1.8 2006/09/11 09:39:33 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
@@ -46,6 +46,8 @@ let create_host dbh canonical_hostname hostnames template
   ) else (
     (* Copy from template. *)
 
+    (* XXX - See tools/copy_host for a more reliable way to do this - XXX. *)
+
     (* Use low-level PG'OCaml calls to make a duplicate of the
      * old hosts row where id = template.
      *
@@ -124,6 +126,8 @@ let create_host dbh canonical_hostname hostnames template
            from contact_emails ce, contacts c
           where ce.contactid = c.id and c.hostid = $template";
 
+    (* XXX Macros. *)
+
     (* Set the title of the index page. *)
     PGSQL(dbh)
       "update pages set title = $title