More thorough inclusion of the page bug. This should mean the page bug appears just...
[cocanwiki.git] / scripts / change_password.ml
index fcb561f..37d92aa 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: change_password.ml,v 1.3 2004/10/30 10:16:09 rich Exp $
+ * $Id: change_password.ml,v 1.4 2005/11/24 14:54:11 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
@@ -49,7 +49,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ user =
   if not old_password_ok then (
     error ~title:"Bad password"
       ~back_button:true
-      q "The password you gave is wrong.";
+      dbh hostid q "The password you gave is wrong.";
     return ()
   );
 
@@ -58,13 +58,13 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ user =
 
   if password1 = "" || password2 = "" then (
     error ~back_button:true ~title:"Bad password"
-      q "The password you gave is empty.";
+      dbh hostid q "The password you gave is empty.";
     return ()
   );
 
   if password1 <> password2 then (
     error ~back_button:true ~title:"Passwords don't match"
-      q "The two passwords you gave aren't identical.";
+      dbh hostid q "The two passwords you gave aren't identical.";
     return ()
   );
 
@@ -81,7 +81,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ user =
 
   let buttons = [ ok_button "/" ] in
   ok ~buttons ~title:"Password changed"
-    q "The password was changed."
+    dbh hostid q "The password was changed."
 
 let () =
   register_script ~anonymous:false run