2017-11-28 Fred Gleason <fredg@paravelsystems.com>

* Implemented application of the 'Purge Logs' setting when creating
	logs manually.
	* Changed the wording of the 'Purge Logs' and 'Purge ELR Data'
	control in the Edit Service dialog in rdadmin(1).
	* Added 'RDLog::create()' and 'RDLog::remove()' static methods.
This commit is contained in:
Fred Gleason
2017-11-28 12:41:45 -05:00
parent eabd1d7ed5
commit cbba0eb10a
41 changed files with 471 additions and 292 deletions

View File

@@ -60,21 +60,10 @@ void Xport::AddLog()
XmlExit("Unauthorized",404,"logs.cpp",LINE_NUMBER);
}
RDLog *log=new RDLog(log_name);
if(!log->exists()) {
delete log;
log=new RDLog(log_name,true);
if(!log->exists()) {
delete log;
XmlExit("Unable to create log",500,"logs.cpp",LINE_NUMBER);
}
log->setOriginUser(xport_user->name());
log->setDescription("[new log]");
log->setService(service_name);
QString err_msg;
if(!RDLog::create(log_name,service_name,xport_user->name(),&err_msg)) {
XmlExit(err_msg,500,"logs.cpp",LINE_NUMBER);
}
delete log;
RDCreateLogTable(RDLog::tableName(log_name));
XmlExit("OK",200,"logs.cpp",LINE_NUMBER);
}