+csv dep for PG'OCaml.
[cocanwiki.git] / scripts / signup.ml
index d3e28ac..a69d83b 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: signup.ml,v 1.11 2006/03/28 16:24:08 rich Exp $
+ * $Id: signup.ml,v 1.12 2006/12/06 09:46:57 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,8 +39,9 @@ let run r (q : cgi) dbh hostid _ _ =
 
   if not create_account_anon then (
     error ~title:"Not allowed to create accounts"
-      dbh hostid q ("To get an account on this service, please contact the " ^
-                   "administrator.");
+      r dbh hostid q
+      ("To get an account on this service, please contact the " ^
+        "administrator.");
     return ()
   );
 
@@ -50,13 +51,13 @@ let run r (q : cgi) dbh hostid _ _ =
 
   if username = "" || password1 = "" || password2 = "" then (
     error ~back_button:true ~title:"Bad username or password"
-      dbh hostid q "The username or password you gave is empty.";
+      dbh hostid q "The username or password you gave is empty.";
     return ()
   );
 
   if password1 <> password2 then (
     error ~back_button:true ~title:"Passwords don't match"
-      dbh hostid q "The two passwords you gave aren't identical.";
+      dbh hostid q "The two passwords you gave aren't identical.";
     return ()
   );
 
@@ -64,7 +65,7 @@ let run r (q : cgi) dbh hostid _ _ =
 
   if UTF8.length username > 32 || UTF8.length password > 128 then (
     error ~back_button:true ~title:"Username or password too long"
-      dbh hostid q "Usernames should be less than 32 characters long.  For passwords we let you have a generous 128 characters.";
+      dbh hostid q "Usernames should be less than 32 characters long.  For passwords we let you have a generous 128 characters.";
     return ()
   );
 
@@ -78,7 +79,7 @@ let run r (q : cgi) dbh hostid _ _ =
   (match rows with
    | [_] ->
        error ~back_button:true ~title:"Username already taken"
-        dbh hostid q
+        dbh hostid q
         ("Someone, possibly you, has already taken that username. " ^
            "If you think you have forgotten your password, try going back " ^
            "and clicking on the 'Forgotten your password?' link.");
@@ -106,7 +107,7 @@ let run r (q : cgi) dbh hostid _ _ =
   ok ~title:"Account created"
     ~buttons
     ~cookie
-    dbh hostid q
+    dbh hostid q
     ("An account was created for you, " ^ username ^ ". " ^
      "We hope you enjoy using this service.")