mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-07 01:13:50 +02:00
2020-10-05 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug the 'Editing Event' dialog in rdlogmanager(1) that caused the Services List to be initialized with all services upon creation, even when one or more services had already be added to the list by the user. * Fixed a bug the 'Edit Clock' dialog in rdlogmanager(1) that caused the Services List to be initialized with all services upon creation, even when one or more services had already be added to the list by the user. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
7c33000a0b
commit
7a48deb553
@ -19949,3 +19949,12 @@
|
||||
2020-10-01 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in the 'Test Import' dialog in rdadmin(1) that caused
|
||||
the sort of events in the 'Imported Events' list to be incorrect.
|
||||
2020-10-05 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug the 'Editing Event' dialog in rdlogmanager(1) that
|
||||
caused the Services List to be initialized with all services upon
|
||||
creation, even when one or more services had already be added to
|
||||
the list by the user.
|
||||
* Fixed a bug the 'Edit Clock' dialog in rdlogmanager(1) that
|
||||
caused the Services List to be initialized with all services upon
|
||||
creation, even when one or more services had already be added to
|
||||
the list by the user.
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// List Rivendell Log Clocks
|
||||
//
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// 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
|
||||
@ -234,13 +234,20 @@ void ListClocks::addData()
|
||||
}
|
||||
else {
|
||||
if(edit_filter_box->currentItem()==0) {
|
||||
sql="select NAME from SERVICES";
|
||||
sql=QString("select ")+
|
||||
"ID "+ // 00
|
||||
"from CLOCK_PERMS where "+
|
||||
"CLOCK_NAME=\""+RDEscapeString(clockname)+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
sql=QString("insert into CLOCK_PERMS set ")+
|
||||
"CLOCK_NAME=\""+RDEscapeString(clockname)+"\","+
|
||||
"SERVICE_NAME=\""+RDEscapeString(q->value(0).toString())+"\"";
|
||||
if(!q->first()) {
|
||||
sql="select NAME from SERVICES";
|
||||
q1=new RDSqlQuery(sql);
|
||||
while(q1->next()) {
|
||||
sql=QString("insert into CLOCK_PERMS set ")+
|
||||
"CLOCK_NAME=\""+RDEscapeString(clockname)+"\","+
|
||||
"SERVICE_NAME=\""+RDEscapeString(q1->value(0).toString())+"\"";
|
||||
RDSqlQuery::apply(sql);
|
||||
}
|
||||
delete q1;
|
||||
}
|
||||
delete q;
|
||||
@ -249,8 +256,7 @@ void ListClocks::addData()
|
||||
sql=QString("insert into CLOCK_PERMS set ")+
|
||||
"CLOCK_NAME=\""+RDEscapeString(clockname)+"\","+
|
||||
"SERVICE_NAME=\""+RDEscapeString(edit_filter_box->currentText())+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
RDSqlQuery::apply(sql);
|
||||
}
|
||||
Q3ListViewItem *item=new Q3ListViewItem(edit_clocks_list);
|
||||
item->setText(0,clockname);
|
||||
|
@ -213,25 +213,29 @@ void ListEvents::addData()
|
||||
}
|
||||
else {
|
||||
if(edit_filter_box->currentItem()==0) {
|
||||
sql="select NAME from SERVICES";
|
||||
sql=QString(" select ")+
|
||||
"ID "+ // 00
|
||||
"from EVENT_PERMS where "+
|
||||
"EVENT_NAME=\""+RDEscapeString(logname)+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
sql=QString().sprintf("insert into EVENT_PERMS set\
|
||||
EVENT_NAME=\"%s\",SERVICE_NAME=\"%s\"",
|
||||
(const char *)logname,
|
||||
(const char *)q->value(0).toString());
|
||||
if(!q->first()) {
|
||||
sql="select NAME from SERVICES";
|
||||
q1=new RDSqlQuery(sql);
|
||||
while(q1->next()) {
|
||||
sql=QString("insert into EVENT_PERMS set ")+
|
||||
"EVENT_NAME=\""+RDEscapeString(logname)+"\","+
|
||||
"SERVICE_NAME=\""+RDEscapeString(q1->value(0).toString())+"\"";
|
||||
RDSqlQuery::apply(sql);
|
||||
}
|
||||
delete q1;
|
||||
}
|
||||
delete q;
|
||||
}
|
||||
else {
|
||||
sql=QString().sprintf("insert into EVENT_PERMS set\
|
||||
EVENT_NAME=\"%s\",SERVICE_NAME=\"%s\"",
|
||||
(const char *)logname,
|
||||
(const char *)edit_filter_box->currentText());
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
sql=QString("insert into EVENT_PERMS set ")+
|
||||
"EVENT_NAME=\""+RDEscapeString(logname)+"\","+
|
||||
"SERVICE_NAME=\""+RDEscapeString(edit_filter_box->currentText())+"\"";
|
||||
RDSqlQuery::apply(sql);
|
||||
}
|
||||
}
|
||||
delete event_dialog;
|
||||
|
Loading…
x
Reference in New Issue
Block a user