Fixed 64 bit count. Version 1.3.20.
authorrich <rich>
Mon, 5 Dec 2005 10:07:44 +0000 (10:07 +0000)
committerrich <rich>
Mon, 5 Dec 2005 10:07:44 +0000 (10:07 +0000)
Makefile.config
scripts/admin/host.ml

index 5e8d827..24a30bc 100644 (file)
@@ -1,7 +1,7 @@
-# $Id: Makefile.config,v 1.28 2005/11/24 14:54:25 rich Exp $
+# $Id: Makefile.config,v 1.29 2005/12/05 10:07:44 rich Exp $
 
 PACKAGE := cocanwiki
-VERSION := 1.3.19
+VERSION := 1.3.20
 
 # Normally ignored.  However, if you are installing centrally (using
 # 'make pkg-install'), then the components are installed in the
index 4cec09c..8625632 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: host.ml,v 1.7 2004/10/21 19:54:29 rich Exp $
+ * $Id: host.ml,v 1.8 2005/12/05 10:07:45 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
@@ -55,14 +55,17 @@ let run r (q : cgi) (dbh : Dbi.connection) _ _ _ =
     match sth#fetch1 () with
        [ `String canonical_hostname;
          `Bool has_css;
-         (`Null | `Int _) as page_count; (`Null | `Int _) as total_count;
+         (`Null | `Int _ | `Int64 _) as page_count;
+          (`Null | `Int _ | `Int64 _) as total_count;
          (`Null | `Timestamp _) as last_modified_date;
          (`Null | `Timestamp _) as creation_date ] ->
          let page_count = match page_count with
              `Null -> 0
+           | `Int64 n -> Int64.to_int n
            | `Int n -> n in
          let total_count = match total_count with
              `Null -> 0
+            | `Int64 n -> Int64.to_int n
            | `Int n -> n in
          let last_modified_date = match last_modified_date with
              `Null -> ""
@@ -72,7 +75,7 @@ let run r (q : cgi) (dbh : Dbi.connection) _ _ _ =
            | `Timestamp t -> printable_date t in
          canonical_hostname, has_css, page_count, total_count,
          last_modified_date, creation_date
-      | _ -> assert false in
+      | xs -> failwith (Dbi.sdebug xs) in
 
   template#set "canonical_hostname" canonical_hostname;
   template#conditional "has_css" has_css;