X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=scripts%2Fuser_prefs_form.ml;h=4d66eb7325d35ff808a19f3b80ad85139947d32f;hb=cd059731a60fd3d4dcf426430ad26ff227b91910;hp=69089042c70fca2f8b460fdae6c3d190145e7dcc;hpb=bfa88724ee152ba00c2b2fca881dd78a6599820a;p=cocanwiki.git diff --git a/scripts/user_prefs_form.ml b/scripts/user_prefs_form.ml index 6908904..4d66eb7 100644 --- a/scripts/user_prefs_form.ml +++ b/scripts/user_prefs_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: user_prefs_form.ml,v 1.4 2006/03/27 18:09:47 rich Exp $ + * $Id: user_prefs_form.ml,v 1.5 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 @@ -39,15 +39,11 @@ let run r (q : cgi) dbh hostid host user = let can_edit = can_edit host user in (* Pull out the registration date - not stored in the user object. *) - let sth = - dbh#prepare_cached - "select registration_date from users where hostid = ? and id = ?" in - sth#execute [Some hostid; Some userid]; - - let registration_date = - match sth#fetch1 () with - [ `Date registration_date ] -> registration_date - | _ -> assert false in + let registration_date = List.hd ( + PGSQL(dbh) + "select registration_date from users + where hostid = $hostid and id = $userid" + ) in let email, has_email = match prefs.email with