2021-08-15 Fred Gleason <fredg@paravelsystems.com>

* Fixed a regression in rdadmin(1) that threw a SQL error when
	attempting to create a new Replicator entry.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2021-08-15 16:02:21 -04:00
parent 4e1c92e07c
commit d51c4c2e4c
3 changed files with 6 additions and 2 deletions

View File

@ -22281,3 +22281,6 @@
creating a new Service entry.
* Fixed a bug in rdadmin(1) that could cause a segfault when
creating a new Schedule Code entry.
2021-08-15 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in rdadmin(1) that threw a SQL error when
attempting to create a new Replicator entry.

View File

@ -242,7 +242,7 @@ void RDReplicatorListModel::updateRowLine(int line)
if(line<d_texts.size()) {
QString sql=sqlFields()+
"where `REPLICATORS`.`NAME`='"+
RDEscapeString(d_texts.at(line).at(line).toString())+"'";
RDEscapeString(d_texts.at(line).at(0).toString())+"'";
RDSqlQuery *q=new RDSqlQuery(sql);
if(q->first()) {
updateRow(line,q);

View File

@ -107,7 +107,8 @@ void AddReplicator::okData()
}
sql=QString("insert into `REPLICATORS` set ")+
"`NAME`='"+RDEscapeString(repl_name_edit->text())+"'";
"`NAME`='"+RDEscapeString(repl_name_edit->text())+"',"+
QString().sprintf("`TYPE_ID`=%u",RDReplicator::TypeCitadelXds);
q=new RDSqlQuery(sql);
if(!q->isActive()) {
QMessageBox::warning(this,tr("Replicator Exists"),tr("A replicator with that name already exists!"));