One-step create & edit.
[cocanwiki.git] / scripts / mailing_list_confirm.ml
index 2f8ff0c..c1308e6 100644 (file)
@@ -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.
- * $Id: mailing_list_confirm.ml,v 1.1 2004/09/24 16:41:16 rich Exp $
+ * $Id: mailing_list_confirm.ml,v 1.3 2004/10/04 15:19:56 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
@@ -35,7 +35,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
                                  where hostid = ? and pending = ?" in
   sth#execute [`Int hostid; `String pending];
 
-  let page =
+  let email =
     try
       sth#fetch1string ()
     with
@@ -52,10 +52,10 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
   dbh#commit ();
 
   (* Confirmed. *)
-  let buttons = [ ok_button ("/" ^ page) ] in
+  let buttons = [ ok_button "/" ] in
   ok ~buttons ~title:"Confirmed"
     q ("Your email address has been confirmed.  " ^
        "You are now on our mailing list.")
 
 let () =
-  register_script run
+  register_script ~restrict:[CanView] run