mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-25 14:50:11 +01:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user