More thorough inclusion of the page bug. This should mean the page bug appears just...
[cocanwiki.git] / scripts / source.ml
index d724e01..0a0fb20 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: source.ml,v 1.1 2004/10/27 21:14:05 rich Exp $
+ * $Id: source.ml,v 1.3 2005/11/24 14:54:13 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
@@ -43,7 +43,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
     with
        Not_found ->
          error ~title:"Page not found"
-           q "That page was not found";
+           dbh hostid q "That page was not found";
          return () in
 
   (* XXX CSS - eventually both title and CSS fields should be returned in
@@ -87,4 +87,4 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
         ignore (print_newline r)) model.contents
 
 let () =
-  register_script run
+  register_script ~restrict:[CanView] run