From dd1fb6e16ff777d3e098076d1015c6c565b51bb7 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 25 Nov 2011 11:59:37 +0100 Subject: Reuse environment (macrolist) instead of creating a new one. Add 'to' and 'from' times to export, both unixtimestamps. --- server/src/admin_connection.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'server/src/admin_connection.cc') diff --git a/server/src/admin_connection.cc b/server/src/admin_connection.cc index 0fe5380..6ad7642 100644 --- a/server/src/admin_connection.cc +++ b/server/src/admin_connection.cc @@ -118,8 +118,13 @@ bool AdminConnection::handle(const char *data, size_t size) } if(uri == "/export" && args.find("template") != args.end()) { + time_t from = 0; + if(args.find("from") != args.end()) from = atoi(args["from"].c_str()); + + time_t to = time(NULL); + if(args.find("to") != args.end()) to = atoi(args["to"].c_str()); bool ok; - std::string res = admin_export(env, args["template"], &ok); + std::string res = admin_export(env, args["template"], &ok, from, to); if(!ok) reply = admin_header(uri) + res + admin_rc("footer"); else { reply = res; -- cgit v1.2.3