X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=scripts%2Fmail_import.ml;h=1c4f709b293f3c97e052876bb028a0699a0b2539;hb=aec0096a00df1b58b7a057618ad9f3baab7c846c;hp=0cd7a67563c32182ed868302d874e748e2fef63e;hpb=eb57cb1d3f0af6474edcca4fbe5a5be2b6288b6d;p=cocanwiki.git diff --git a/scripts/mail_import.ml b/scripts/mail_import.ml index 0cd7a67..1c4f709 100644 --- a/scripts/mail_import.ml +++ b/scripts/mail_import.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: mail_import.ml,v 1.4 2004/10/12 10:00:38 rich Exp $ + * $Id: mail_import.ml,v 1.5 2004/10/14 15:57:15 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 @@ -36,6 +36,7 @@ open Cocanwiki_template open Cocanwiki_date open Cocanwiki_strings open Cocanwiki_pages +open Cocanwiki_mail let irt_re = Pcre.regexp "<.*?>" let ws_re = Pcre.regexp "\\s+" @@ -348,6 +349,10 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ user = *) save_page dbh hostid ~user ~r model; + (* Rebuild threads? *) + if rebuild then + thread_mail dbh hostid date.Dbi.year date.Dbi.month; + (* Commit to the database. *) dbh#commit ();