(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: mail_rebuild.ml,v 1.1 2004/10/21 11:42:04 rich Exp $
+ * $Id: mail_rebuild.ml,v 1.6 2006/12/06 09:46:57 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
open Cocanwiki_ok
open Cocanwiki_mail
-let run r (q : cgi) (dbh : Dbi.connection) hostid _ user =
+let run r (q : cgi) dbh hostid _ user =
let year = int_of_string (q#param "year") in
let month = int_of_string (q#param "month") in
- thread_mail dbh hostid ~user ~r year month;
+ thread_mail r dbh hostid ~user year month;
(* Commit to the database. *)
- dbh#commit ();
+ PGOCaml.commit dbh;
(* Finish off. *)
ok ~title:"Rebuilt"
- q ("Thread index rebuilt.")
+ r dbh hostid q "Thread index rebuilt."
let () =
register_script ~restrict:[CanImportMail] run