git.annexia.org
/
cocanwiki.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Scripts updated to use new PG interface.
[cocanwiki.git]
/
scripts
/
rename_page_form.ml
diff --git
a/scripts/rename_page_form.ml
b/scripts/rename_page_form.ml
index
46ec6ac
..
5d60967
100644
(file)
--- a/
scripts/rename_page_form.ml
+++ b/
scripts/rename_page_form.ml
@@
-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.
(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: rename_page_form.ml,v 1.
2 2006/03/27 18:09:46
rich Exp $
+ * $Id: rename_page_form.ml,v 1.
3 2006/03/28 16:24:08
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
*
* 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
@@
-32,11
+32,10
@@
let run r (q : cgi) dbh hostid _ _ =
let page = q#param "page" in
let page = q#param "page" in
- let sth = dbh#prepare_cached "select title from pages
- where hostid = ? and url = ?" in
- sth#execute [Some hostid; Some page];
-
- let title = sth#fetch1string () in
+ let title = List.hd (
+ PGSQL(dbh) "select title from pages
+ where hostid = $hostid and url = $page"
+ ) in
template#set "page" page;
template#set "title" title;
template#set "page" page;
template#set "title" title;