X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=scripts%2Flib%2Fcocanwiki_pages.ml;h=24e229144e53c43a03809b79dd4b3eec5de163e9;hb=e336401181f56f19ec18175d47462e7a5d5f07e2;hp=f6abd616e3ede51b660c008336ce5713169d0be3;hpb=c5f822d1ca81042a8c0be2955668b0abebf1b11c;p=cocanwiki.git diff --git a/scripts/lib/cocanwiki_pages.ml b/scripts/lib/cocanwiki_pages.ml index f6abd61..24e2291 100644 --- a/scripts/lib/cocanwiki_pages.ml +++ b/scripts/lib/cocanwiki_pages.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: cocanwiki_pages.ml,v 1.2 2004/10/30 10:16:10 rich Exp $ + * $Id: cocanwiki_pages.ml,v 1.3 2004/11/22 11:07:32 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 @@ -194,6 +194,12 @@ let save_page (dbh : Dbi.connection) hostid ?user ?r model = creation_date, url, title, css | _ -> assert false in + (* Title changed? *) + let title = + match model.pt with + Title new_title when title <> new_title -> new_title + | _ -> title in + (* Has someone else edited this page in the meantime? *) let sth = dbh#prepare_cached "select max(id) from pages where hostid = ? and url = ?" in