X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=scripts%2Fedit.ml;h=abf8e3ca60d409bab2ffee9a005cef4ca83a9389;hb=bfc0f85bc1869f5139505dd6ffbacecb1af564a4;hp=2e4a6cd3a19629a99808c44848e0956b2cdf092f;hpb=6eacefcb7258db7b56fe796af84961cafac90eac;p=cocanwiki.git diff --git a/scripts/edit.ml b/scripts/edit.ml index 2e4a6cd..abf8e3c 100644 --- a/scripts/edit.ml +++ b/scripts/edit.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: edit.ml,v 1.20 2004/10/11 14:13:04 rich Exp $ + * $Id: edit.ml,v 1.22 2004/10/25 07:44:55 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 @@ -431,7 +431,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid {hostname = hostname} user = "Page: http://" ^ hostname ^ "/" ^ url ^ "\n\n" ^ diff in - email_notify ~body ~subject dbh hostid; + email_notify ~body ~subject ~user dbh hostid; (* Redirect back to the URL. *) q#redirect ("http://" ^ hostname ^ "/" ^ url); @@ -442,7 +442,8 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid {hostname = hostname} user = let cancel id = let url = if id <> 0 then ( - let sth = dbh#prepare_cached "select url from pages + let sth = dbh#prepare_cached "select coalesce (url, url_deleted) + from pages where hostid = ? and id = ?" in sth#execute [`Int hostid; `Int id]; sth#fetch1string ()