mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-26 01:18:11 +02:00
2021-04-19 Fred Gleason <fredg@paravelsystems.com>
* Escaped all SQL identifiers in 'rdlogedit/'. * Replaced " with ' delimiters in all SQL literal strings in 'rdlogedit/'. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
ad56584012
commit
c45cc83e15
@ -21507,3 +21507,7 @@
|
|||||||
* Escaped all SQL identifiers in 'rdlibrary/'.
|
* Escaped all SQL identifiers in 'rdlibrary/'.
|
||||||
* Replaced " with ' delimiters in all SQL literal strings in
|
* Replaced " with ' delimiters in all SQL literal strings in
|
||||||
'rdlibrary/'.
|
'rdlibrary/'.
|
||||||
|
2021-04-19 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Escaped all SQL identifiers in 'rdlogedit/'.
|
||||||
|
* Replaced " with ' delimiters in all SQL literal strings in
|
||||||
|
'rdlogedit/'.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Edit a Rivendell Log Chain Entry
|
// Edit a Rivendell Log Chain Entry
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// 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
|
||||||
@ -18,9 +18,6 @@
|
|||||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <qpushbutton.h>
|
|
||||||
#include <qmessagebox.h>
|
|
||||||
|
|
||||||
#include <rdapplication.h>
|
#include <rdapplication.h>
|
||||||
#include <rddb.h>
|
#include <rddb.h>
|
||||||
#include <rdescape_string.h>
|
#include <rdescape_string.h>
|
||||||
@ -106,8 +103,8 @@ void EditChain::selectLogData()
|
|||||||
void EditChain::labelChangedData(const QString &logname)
|
void EditChain::labelChangedData(const QString &logname)
|
||||||
{
|
{
|
||||||
QString sql=
|
QString sql=
|
||||||
QString("select DESCRIPTION from LOGS where ")+
|
QString("select `DESCRIPTION` from `LOGS` where ")+
|
||||||
"NAME=\""+RDEscapeString(logname)+"\"";
|
"`NAME`='"+RDEscapeString(logname)+"'";
|
||||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||||
if(!q->first()) {
|
if(!q->first()) {
|
||||||
delete q;
|
delete q;
|
||||||
|
@ -99,14 +99,11 @@ EditLog::EditLog(QString logname,QString *filter,QString *group,
|
|||||||
// Log Name
|
// Log Name
|
||||||
//
|
//
|
||||||
edit_modified_label=new QLabel(this);
|
edit_modified_label=new QLabel(this);
|
||||||
// edit_modified_label->setBackgroundColor(QColor(system_mid_color));
|
|
||||||
edit_modified_label->setAlignment(Qt::AlignCenter|Qt::AlignVCenter);
|
edit_modified_label->setAlignment(Qt::AlignCenter|Qt::AlignVCenter);
|
||||||
edit_modified_label->setFont(progressFont());
|
edit_modified_label->setFont(progressFont());
|
||||||
edit_logname_label=new QLabel(logname,this);
|
edit_logname_label=new QLabel(logname,this);
|
||||||
// edit_logname_label->setBackgroundColor(QColor(system_mid_color));
|
|
||||||
edit_logname_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
edit_logname_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||||
edit_logname_label_label=new QLabel(tr("Log Name:"),this);
|
edit_logname_label_label=new QLabel(tr("Log Name:"),this);
|
||||||
// edit_logname_label_label->setBackgroundColor(QColor(system_mid_color));
|
|
||||||
edit_logname_label_label->setFont(labelFont());
|
edit_logname_label_label->setFont(labelFont());
|
||||||
edit_logname_label_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
edit_logname_label_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||||
|
|
||||||
@ -114,10 +111,8 @@ EditLog::EditLog(QString logname,QString *filter,QString *group,
|
|||||||
// Track Counts
|
// Track Counts
|
||||||
//
|
//
|
||||||
edit_track_label=new QLabel(this);
|
edit_track_label=new QLabel(this);
|
||||||
// edit_track_label->setBackgroundColor(QColor(system_mid_color));
|
|
||||||
edit_track_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
edit_track_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||||
edit_track_label_label=new QLabel(tr("Tracks:"),this);
|
edit_track_label_label=new QLabel(tr("Tracks:"),this);
|
||||||
// edit_track_label_label->setBackgroundColor(QColor(system_mid_color));
|
|
||||||
edit_track_label_label->setFont(labelFont());
|
edit_track_label_label->setFont(labelFont());
|
||||||
edit_track_label_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
edit_track_label_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||||
|
|
||||||
@ -128,10 +123,8 @@ EditLog::EditLog(QString logname,QString *filter,QString *group,
|
|||||||
new QLabel(edit_log->originUser()+QString(" - ")+
|
new QLabel(edit_log->originUser()+QString(" - ")+
|
||||||
edit_log->originDatetime().toString("MM/dd/yyyy - hh:mm:ss"),
|
edit_log->originDatetime().toString("MM/dd/yyyy - hh:mm:ss"),
|
||||||
this);
|
this);
|
||||||
// edit_origin_label->setBackgroundColor(QColor(system_mid_color));
|
|
||||||
edit_origin_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
edit_origin_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||||
edit_origin_label_label=new QLabel(tr("Origin:"),this);
|
edit_origin_label_label=new QLabel(tr("Origin:"),this);
|
||||||
// edit_origin_label_label->setBackgroundColor(QColor(system_mid_color));
|
|
||||||
edit_origin_label_label->setFont(labelFont());
|
edit_origin_label_label->setFont(labelFont());
|
||||||
edit_origin_label_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
edit_origin_label_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||||
|
|
||||||
@ -464,7 +457,7 @@ EditLog::EditLog(QString logname,QString *filter,QString *group,
|
|||||||
edit_purgedate_box->setChecked(true);
|
edit_purgedate_box->setChecked(true);
|
||||||
edit_purgedate_edit->setDate(purge_date);
|
edit_purgedate_edit->setDate(purge_date);
|
||||||
}
|
}
|
||||||
sql=QString("select NAME from SERVICES");
|
sql=QString("select `NAME` from `SERVICES`");
|
||||||
q=new RDSqlQuery(sql);
|
q=new RDSqlQuery(sql);
|
||||||
while(q->next()) {
|
while(q->next()) {
|
||||||
services_list.append( q->value(0).toString() );
|
services_list.append( q->value(0).toString() );
|
||||||
|
@ -446,19 +446,19 @@ void MainWidget::reportData()
|
|||||||
// Report Body
|
// Report Body
|
||||||
//
|
//
|
||||||
sql=QString("select ")+
|
sql=QString("select ")+
|
||||||
"NAME,"+ // 00
|
"`NAME`,"+ // 00
|
||||||
"DESCRIPTION,"+ // 01
|
"`DESCRIPTION`,"+ // 01
|
||||||
"SERVICE,"+ // 02
|
"`SERVICE`,"+ // 02
|
||||||
"MUSIC_LINKS,"+ // 03
|
"`MUSIC_LINKS`,"+ // 03
|
||||||
"MUSIC_LINKED,"+ // 04
|
"`MUSIC_LINKED`,"+ // 04
|
||||||
"TRAFFIC_LINKS,"+ // 05
|
"`TRAFFIC_LINKS`,"+ // 05
|
||||||
"TRAFFIC_LINKED,"+ // 06
|
"`TRAFFIC_LINKED`,"+ // 06
|
||||||
"COMPLETED_TRACKS,"+ // 07
|
"`COMPLETED_TRACKS`,"+ // 07
|
||||||
"SCHEDULED_TRACKS,"+ // 08
|
"`SCHEDULED_TRACKS`,"+ // 08
|
||||||
"START_DATE,"+ // 09
|
"`START_DATE`,"+ // 09
|
||||||
"END_DATE,"+ // 10
|
"`END_DATE`,"+ // 10
|
||||||
"MODIFIED_DATETIME "+ // 11
|
"`MODIFIED_DATETIME` "+ // 11
|
||||||
"from LOGS order by NAME ";
|
"from `LOGS` order by `NAME` ";
|
||||||
q=new RDSqlQuery(sql);
|
q=new RDSqlQuery(sql);
|
||||||
while(q->next()) {
|
while(q->next()) {
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user