git.annexia.org
/
cocanwiki.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added the framework to allow us to populate standards parts of the
[cocanwiki.git]
/
scripts
/
recent.ml
diff --git
a/scripts/recent.ml
b/scripts/recent.ml
index
a1b53be
..
bf75ab2
100644
(file)
--- a/
scripts/recent.ml
+++ b/
scripts/recent.ml
@@
-1,7
+1,7
@@
(* COCANWIKI scripts.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
(* COCANWIKI scripts.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: recent.ml,v 1.
2 2004/09/07 13:40:10
rich Exp $
+ * $Id: recent.ml,v 1.
5 2004/09/08 15:46:53
rich Exp $
*)
open Apache
*)
open Apache
@@
-11,12
+11,13
@@
open Printf
open Cocanwiki
open Cocanwiki_template
open Cocanwiki
open Cocanwiki_template
-
-let template = get_template "recent.html"
+open Cocanwiki_date
let max_age = "3 months"
let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
let max_age = "3 months"
let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
+ let template = get_template dbh hostid "recent.html" in
+
let sth =
dbh#prepare_cached
"select id, url, url_deleted, title, last_modified_date, logged_ip
let sth =
dbh#prepare_cached
"select id, url, url_deleted, title, last_modified_date, logged_ip
@@
-66,4
+67,4
@@
let run r (q : cgi) (dbh : Dbi.connection) (hostid, _, _) _ =
q#template template
let () =
q#template template
let () =
- register_script run
+ register_script
~restrict:[CanEdit]
run