(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: restore.ml,v 1.23 2006/07/27 16:46:55 rich Exp $
+ * $Id: restore.ml,v 1.24 2006/08/04 12:45: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
(* Copy the old version of the page to be live. *)
let rows = PGSQL(dbh)
- "select title, description, creation_date,
+ "select title, description, keywords, creation_date,
redirect, css
from pages
where hostid = $hostid
and url_deleted = $page and id = $version" in
- let title, description, creation_date, redirect, css =
+ let title, description, keywords, creation_date, redirect, css =
match rows with
| [row] -> row
| _ -> assert false in
PGSQL(dbh) "update pages set url_deleted = url, url = null
where hostid = $hostid and url = $page";
PGSQL(dbh) "insert into pages (hostid, url, title,
- description, creation_date, logged_ip,
+ description, keywords,
+ creation_date, logged_ip,
logged_user, redirect, css)
- values ($hostid, $page, $title, $description, $creation_date,
+ values ($hostid, $page, $title, $description, $?keywords,
+ $creation_date,
$?logged_ip, $?logged_user, $?redirect, $?css)";
let pageid = PGOCaml.serial4 dbh "pages_id_seq" in