Fixed up to work with mod_caml 1.3.0-2.
[cocanwiki.git] / scripts / cocanwiki.ml
index e6fb225..037c654 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.ml,v 1.12 2004/09/23 15:16:21 rich Exp $
+ * $Id: cocanwiki.ml,v 1.13 2004/09/27 12:37:54 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,14 +34,6 @@ module Pool = DbiPool (Dbi_postgres)
  *)
 let _get_dbh r = Pool.get r "cocanwiki"
 
-(* The [CgiExit] exception should be folded back into the base
- * mod_caml code at some point.  It just causes the 'run' function to
- * return at that point safely.  (XXX)
- *)
-exception CgiExit
-
-let return () = raise CgiExit
-
 (* Permissions and restrictions.
  *
  * Use the optional ~restrict parameter to register_script to restrict
@@ -195,10 +187,7 @@ let register_script ?(restrict = []) ?(anonymous = true) run =
 
        if permitted then (
         (* Call the actual CGI script. *)
-        try
-          run r q dbh hostid host user
-        with
-            CgiExit -> ()
+        run r q dbh hostid host user
        ) else
         error ~back_button:true
           ~title:"Access denied"