From 5433d3e4a93643e917d2554bc9d10b87bfa79609 Mon Sep 17 00:00:00 2001 From: rich Date: Mon, 5 Dec 2005 10:07:44 +0000 Subject: [PATCH] Fixed 64 bit count. Version 1.3.20. --- Makefile.config | 4 ++-- scripts/admin/host.ml | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile.config b/Makefile.config index 5e8d827..24a30bc 100644 --- a/Makefile.config +++ b/Makefile.config @@ -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 diff --git a/scripts/admin/host.ml b/scripts/admin/host.ml index 4cec09c..8625632 100644 --- a/scripts/admin/host.ml +++ b/scripts/admin/host.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * 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; -- 1.8.3.1