(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: create_macro.ml,v 1.1 2006/07/26 16:26:43 rich Exp $
+ * $Id: create_macro.ml,v 1.2 2006/12/06 09:46:56 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
if name = "" then (
error ~back_button:true ~title:"Name field missing"
- dbh hostid q "You must name your macro.";
+ r dbh hostid q "You must name your macro.";
return ()
);
if not (Pcre.pmatch ~rex:name_re name) then (
error ~back_button:true ~title:"Name field invalid"
- dbh hostid q "Name field can only contain letters and numbers.";
+ r dbh hostid q "Name field can only contain letters and numbers.";
return ()
);
PGOCaml.commit dbh;
let buttons = [ ok_button "/_bin/edit_macros.cmo" ] in
- ok ~title:"Macro created" ~buttons dbh hostid q
+ ok ~title:"Macro created" ~buttons r dbh hostid q
"That macro was created."
let () =