Per-section div class.
[cocanwiki.git] / scripts / lib / cocanwiki_diff.ml
index 3f4fdfa..cba7867 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: cocanwiki_diff.ml,v 1.8 2006/08/14 11:36:50 rich Exp $
+ * $Id: cocanwiki_diff.ml,v 1.9 2006/08/17 09:11:31 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
@@ -47,7 +47,7 @@ let page_for_diff model css =
    | Some noodp -> string_of_bool noodp) ^ "\n\n" ^
   (String.concat ""
      (List.map (
-       fun (sectionname, divname, jsgo, content) ->
+       fun (sectionname, divname, divclass, jsgo, content) ->
          (match sectionname with
           | None -> ""
           | Some sectionname -> "HEADING: " ^ sectionname ^ "\n\n") ^
@@ -55,6 +55,9 @@ let page_for_diff model css =
          (match divname with
           | None -> ""
           | Some divname -> "CSS Id: " ^ divname ^ "\n") ^
+         (match divclass with
+          | None -> ""
+          | Some divclass -> "CSS Class: " ^ divclass ^ "\n") ^
          (match jsgo with
           | None -> ""
           | Some jsgo -> "Javascript Onclick: " ^ jsgo ^ "\n") ^
@@ -117,7 +120,7 @@ let get_version_for_diff dbh version =
     ) in
 
     let contents_ = PGSQL(dbh)
-      "select sectionname, divname, jsgo, content
+      "select sectionname, divname, divclass, jsgo, content
          from contents where pageid = $version
         order by ordering" in