X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=scripts%2Fedit.ml;h=2e9ee5078571d80b6d088d09169973dd6938d4f3;hb=65966a769fea12308cf5a1bccee53d80483ee444;hp=af885a1081cbf176e293b2c24a4477b51748b7aa;hpb=2faa766a005f4fc4f1fd48a36185452f77ceb2b9;p=cocanwiki.git diff --git a/scripts/edit.ml b/scripts/edit.ml index af885a1..2e9ee50 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.21 2004/10/21 19:54:29 rich Exp $ + * $Id: edit.ml,v 1.24 2004/11/01 12:57:53 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 @@ -359,8 +359,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid {hostname = hostname} user = | SaveConflict (new_version, old_version, url, css) -> (* Edited by someone else ... Get the other's changes. *) let other_diff, _ = - get_diff dbh hostid url - ~old_version ~version:new_version () in + get_diff dbh hostid url ~old_version ~version:new_version () in (* Synthesize our own changes. *) let old_page = get_version_for_diff dbh old_version in @@ -442,7 +441,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 ()