(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: login_form.ml,v 1.7 2006/03/28 13:20:00 rich Exp $
+ * $Id: login_form.ml,v 1.8 2006/07/26 13:19:49 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
open Cocanwiki_template
open Cocanwiki_strings
-let run r (q : cgi) dbh hostid _ _ =
+let run r (q : cgi) dbh hostid
+ { create_account_anon = create_account_anon } _ =
let template = get_template dbh hostid "login_form.html" in
let redirect = try q#param "redirect" with Not_found -> "" in
let username = try q#param "username" with Not_found -> "" in
template#set "username" username;
- let create_account_anon =
- List.hd (
- PGSQL(dbh) "select create_account_anon from hosts
- where id = $hostid"
- ) in
-
template#conditional "create_account_anon" create_account_anon;
q#template template