(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* 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
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.
*)
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" ^
(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* 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
(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
(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* 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
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
(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* 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
(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
(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* 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
(* 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. *)
(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* 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
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
(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* 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
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
(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* 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
(* 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