From: rich Date: Sat, 23 Oct 2004 12:00:16 +0000 (+0000) Subject: New release of mod_caml. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=1e757a53a78e6b288f483b3b689a600d20575562;p=cocanwiki.git New release of mod_caml. --- diff --git a/scripts/crash.ml b/scripts/crash.ml index 2795efd..0e2e720 100644 --- a/scripts/crash.ml +++ b/scripts/crash.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: crash.ml,v 1.1 2004/10/09 15:01:58 rich Exp $ + * $Id: crash.ml,v 1.2 2004/10/23 12:00:16 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 @@ -34,6 +34,15 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = let template = get_template dbh hostid "crash.html" in let crash_email = server_settings_crash_email dbh in + (* Get the current time and write it into the logs. *) + let time = Unix.gmtime (Unix.time ()) in + let time = + sprintf "%04d/%02d/%02d %02d:%02d:%02d" + (time.Unix.tm_year + 1900) (time.Unix.tm_mon + 1) time.Unix.tm_mday + time.Unix.tm_hour time.Unix.tm_min time.Unix.tm_sec in + + prerr_endline ("crash: " ^ time); + (* Send a feedback email to the designated address if * server_settings.crash_email is set. *) @@ -41,15 +50,6 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = match crash_email with None -> false | Some email -> - (* Get the current time and write it into the logs. *) - let time = Unix.gmtime (Unix.time ()) in - let time = - sprintf "%04d/%02d/%02d %02d:%02d:%02d" - (time.Unix.tm_year + 1900) (time.Unix.tm_mon + 1) time.Unix.tm_mday - time.Unix.tm_hour time.Unix.tm_min time.Unix.tm_sec in - - prerr_endline ("crash: " ^ time); - let subject = "Crash notify: There was a 500 internal server error" in let body = "Crash at " ^ time ^ "\n" ^ diff --git a/scripts/file.ml b/scripts/file.ml index f22394b..c9032aa 100644 --- a/scripts/file.ml +++ b/scripts/file.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: file.ml,v 1.8 2004/10/15 16:03:01 rich Exp $ + * $Id: file.ml,v 1.9 2004/10/23 12:00:16 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 @@ -76,7 +76,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = (string_of_int (String.length data)); q#header ~content_type:mime_type (); - print_string r data + ignore (print_string r data) let () = register_script ~restrict:[CanView] run diff --git a/scripts/hoststyle.ml b/scripts/hoststyle.ml index 642ba71..6781fa3 100644 --- a/scripts/hoststyle.ml +++ b/scripts/hoststyle.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: hoststyle.ml,v 1.5 2004/09/27 12:37:54 rich Exp $ + * $Id: hoststyle.ml,v 1.6 2004/10/23 12:00:23 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,7 +46,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = Table.set (Request.headers_out r) "Expires" (Expires.medium ()); q#header ~content_type:"text/css" (); - print_string r css + ignore (print_string r css) let () = register_script run diff --git a/scripts/image.ml b/scripts/image.ml index 87ed9de..bfffbfd 100644 --- a/scripts/image.ml +++ b/scripts/image.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: image.ml,v 1.8 2004/10/15 16:03:01 rich Exp $ + * $Id: image.ml,v 1.9 2004/10/23 12:00:23 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 @@ -78,7 +78,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = (string_of_int (String.length data)); q#header ~content_type:mime_type (); - print_string r data + ignore (print_string r data) let () = register_script ~restrict:[CanView] run diff --git a/scripts/page.ml b/scripts/page.ml index 091f213..496efe8 100644 --- a/scripts/page.ml +++ b/scripts/page.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: page.ml,v 1.34 2004/10/23 09:36:11 rich Exp $ + * $Id: page.ml,v 1.35 2004/10/23 12:00:23 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 @@ -352,7 +352,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid (* Deliver the page. *) q#header (); - print_string r xhtml + ignore (print_string r xhtml) with Not_found -> (* No referer / no search terms / not a search engine referer. *) diff --git a/scripts/pagestyle.ml b/scripts/pagestyle.ml index a0d5157..c588487 100644 --- a/scripts/pagestyle.ml +++ b/scripts/pagestyle.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: pagestyle.ml,v 1.5 2004/09/27 12:37:54 rich Exp $ + * $Id: pagestyle.ml,v 1.6 2004/10/23 12:00:24 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 @@ -60,7 +60,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = Table.set (Request.headers_out r) "Expires" (Expires.medium ()); q#header ~content_type:"text/css" (); - print_string r css + ignore (print_string r css) let () = register_script run diff --git a/scripts/preview.ml b/scripts/preview.ml index 6fd0a2b..10e8a4a 100644 --- a/scripts/preview.ml +++ b/scripts/preview.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: preview.ml,v 1.5 2004/10/04 15:19:56 rich Exp $ + * $Id: preview.ml,v 1.6 2004/10/23 12:00:24 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 @@ -34,7 +34,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = let xhtml = Wikilib.xhtml_of_content dbh hostid content in q#header ~content_type:"text/html; charset=utf-8" (); - print_string r xhtml + ignore (print_string r xhtml) let () = register_script ~restrict:[CanView] run diff --git a/scripts/rebuild_links.ml b/scripts/rebuild_links.ml index 91d206e..354776a 100644 --- a/scripts/rebuild_links.ml +++ b/scripts/rebuild_links.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: rebuild_links.ml,v 1.2 2004/09/28 11:28:39 rich Exp $ + * $Id: rebuild_links.ml,v 1.3 2004/10/23 12:00:24 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 @@ -82,7 +82,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = (* Finish off. *) dbh#commit (); - print_string r template_done#to_string + ignore (print_string r template_done#to_string) let () = register_script ~restrict:[CanManageSite] run