X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=scripts%2Frename_page_form.ml;h=5d60967d0d691cf1273c56878b1f709cf4d6eafc;hb=cd059731a60fd3d4dcf426430ad26ff227b91910;hp=46ec6ac065431e838e3021503aa9a11cb89ae858;hpb=bfa88724ee152ba00c2b2fca881dd78a6599820a;p=cocanwiki.git diff --git a/scripts/rename_page_form.ml b/scripts/rename_page_form.ml index 46ec6ac..5d60967 100644 --- 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 . * 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 @@ -32,11 +32,10 @@ let run r (q : cgi) dbh hostid _ _ = 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;