moogle_TPL
let exec_action dbd (req: Http_types.request) outchan =
+ let dbd = dbd () in
let term_str = req#param "expression" in
try
if req#path = "/elim" &&
if expression = "" then
send_results (`Results []) req outchan
else begin
- let results = Whelp.locate ~dbd expression in
+ let results = Whelp.locate ~dbd:(dbd ()) expression in
let results = List.map UriManager.string_of_uri results in
send_results (`Results results) req outchan
end
printf "HTML directory is %s\n" pages_dir;
flush stdout;
Unix.putenv "http_proxy" "";
- let dbd =
+ let dbd () =
HMysql.quick_connect
~host:(Helm_registry.get "db.host")
~database:(Helm_registry.get "db.database")