Logging in and logging out.
[cocanwiki.git] / scripts / upload_image.ml
index 58bc7aa..579f609 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI scripts.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: upload_image.ml,v 1.1 2004/09/07 10:14:09 rich Exp $
+ * $Id: upload_image.ml,v 1.3 2004/09/07 14:58:34 rich Exp $
  *)
 
 open Apache
@@ -11,11 +11,10 @@ open Printf
 
 open ExtString
 
-open Merjisforwiki
-
 open Cocanwiki
 open Cocanwiki_ok
 open Cocanwiki_emailnotify
+open Cocanwiki_images
 
 let is_ws_re = Pcre.regexp "^\\s*$"
 let is_whitespace str = Pcre.pmatch ~rex:is_ws_re str
@@ -23,7 +22,7 @@ let is_whitespace str = Pcre.pmatch ~rex:is_ws_re str
 (* Valid image names. *)
 let image_ok_re = Pcre.regexp "^[a-z0-9][_a-z0-9]*\\.(jpg|jpeg|gif|ico|png)$"
 
-let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname) _ =
+let run r (q : cgi) (dbh : Dbi.connection) (hostid, hostname, _) _ =
   let name = q#param "name" in
   let alt = q#param "alt" in
   let title = q#param "title" in