2016-03-30 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in 'utils/rdmaint/rdmaint.cpp' that caused purging
	of ELR data from services containing a '-' in its name to fail.
This commit is contained in:
Fred Gleason 2016-03-30 18:49:27 -04:00
parent 882c4b5956
commit c89208cf69
2 changed files with 7 additions and 7 deletions

View File

@ -15057,3 +15057,6 @@
* Fixed a regression in 'rdlibrary/audio_cart.cpp' that caused * Fixed a regression in 'rdlibrary/audio_cart.cpp' that caused
cuts to be shown as invalid when 'Schedule Cuts by weight' was cuts to be shown as invalid when 'Schedule Cuts by weight' was
selected. selected.
2016-03-30 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'utils/rdmaint/rdmaint.cpp' that caused purging
of ELR data from services containing a '-' in its name to fail.

View File

@ -2,9 +2,7 @@
// //
// A Utility for running periodic system maintenance. // A Utility for running periodic system maintenance.
// //
// (C) Copyright 2008 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2008-2016 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: rdmaint.cpp,v 1.9.4.4 2013/11/13 23:36:39 cvs Exp $
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as // it under the terms of the GNU General Public License version 2 as
@ -234,10 +232,9 @@ void MainObject::PurgeElr()
while(q->next()) { while(q->next()) {
QString tablename=q->value(0).toString()+"_SRT"; QString tablename=q->value(0).toString()+"_SRT";
tablename.replace(" ","_"); tablename.replace(" ","_");
sql=QString().sprintf("delete from %s where EVENT_DATETIME<\"%s 00:00:00\"", sql=QString("delete from `")+tablename+"` where "+
(const char *)tablename, "EVENT_DATETIME<\""+
(const char *)dt.addDays(-q->value(1).toInt()). dt.addDays(-q->value(1).toInt()).toString("yyyy-MM-dd")+" 00:00:00\"";
toString("yyyy-MM-dd"));
q1=new RDSqlQuery(sql); q1=new RDSqlQuery(sql);
delete q1; delete q1;
} }