More thorough inclusion of the page bug. This should mean the page bug appears just...
[cocanwiki.git] / scripts / page.ml
index aa66aed..b4e553c 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: page.ml,v 1.41 2005/11/23 11:05:54 rich Exp $
+ * $Id: page.ml,v 1.42 2005/11/24 14:54:12 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
@@ -486,8 +486,9 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid
   let rec loop page' i =
     if i > max_redirect then (
       error ~title:"Too many redirections" ~back_button:true
-        q ("Too many redirects between pages.  This may happen because " ^
-          "of a cycle of redirections.");
+        dbh hostid q
+       ("Too many redirects between pages.  This may happen because " ^
+        "of a cycle of redirections.");
       return ()
     ) else
       match fetch_page page' version allow_redirect with