mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-11 15:16:07 +01:00
2017-10-15 Fred Gleason <fredg@paravelsystems.com>
* Added a 'STATIONS.SHORT_NAME' field to the database. * Incremented the database version to 270. * Added 'RDStation::shortName()' and 'RDStation::setShortName()' methods. * Removed the 'Broadcast Security Model' control from the 'Edit Host' dialog. * Added a 'Short Name' control to the 'Edit Host' dialog. * Implemented a '%R' wildcard for Rivendell Host Short Name.
This commit is contained in:
@@ -509,7 +509,7 @@ void MainObject::Setpurgedate(const QDate &date)
|
||||
|
||||
void MainObject::Setservice(const QString &str)
|
||||
{
|
||||
RDSvc *svc=new RDSvc(str,edit_config);
|
||||
RDSvc *svc=new RDSvc(str,edit_station,edit_config);
|
||||
if(svc->exists()) {
|
||||
edit_service=str;
|
||||
edit_modified=true;
|
||||
|
||||
@@ -209,7 +209,7 @@ void MainWidget::serviceActivatedData(int index)
|
||||
if(dg_svc!=NULL) {
|
||||
delete dg_svc;
|
||||
}
|
||||
dg_svc=new RDSvc(dg_service_box->currentText(),dg_config);
|
||||
dg_svc=new RDSvc(dg_service_box->currentText(),dg_station,dg_config);
|
||||
if(dg_group!=NULL) {
|
||||
delete dg_group;
|
||||
}
|
||||
@@ -391,7 +391,8 @@ bool MainWidget::WriteTrafficFile()
|
||||
// Open Output File
|
||||
//
|
||||
outname=RDDateDecode(dg_svc->importPath(RDSvc::Traffic,RDSvc::Linux),
|
||||
dg_date_edit->date(),dg_config,dg_svc->name());
|
||||
dg_date_edit->date(),dg_station,
|
||||
dg_config,dg_svc->name());
|
||||
if((f=fopen(outname,"w"))==NULL) {
|
||||
LogMessage(tr("WARNING: Unable to open traffic output file")+" \""+
|
||||
outname+"\" ["+strerror(errno)+"].");
|
||||
|
||||
@@ -235,6 +235,10 @@ void MainObject::Revert(int schema) const
|
||||
case 269:
|
||||
Revert269();
|
||||
break;
|
||||
|
||||
case 270:
|
||||
Revert270();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -706,6 +710,19 @@ void MainObject::Revert269() const
|
||||
}
|
||||
|
||||
|
||||
void MainObject::Revert270() const
|
||||
{
|
||||
QString sql;
|
||||
QSqlQuery *q;
|
||||
|
||||
sql="alter table STATIONS drop column SHORT_NAME";
|
||||
q=new QSqlQuery(sql);
|
||||
delete q;
|
||||
|
||||
SetVersion(269);
|
||||
}
|
||||
|
||||
|
||||
int MainObject::GetVersion() const
|
||||
{
|
||||
QString sql;
|
||||
@@ -750,7 +767,7 @@ int MainObject::MapSchema(const QString &ver)
|
||||
version_map["2.15"]=259;
|
||||
version_map["2.16"]=263;
|
||||
version_map["2.17"]=268;
|
||||
version_map["2.18"]=269;
|
||||
version_map["2.18"]=270;
|
||||
|
||||
//
|
||||
// Normalize String
|
||||
|
||||
@@ -65,6 +65,7 @@ class MainObject : public QObject
|
||||
void Revert267() const;
|
||||
void Revert268() const;
|
||||
void Revert269() const;
|
||||
void Revert270() const;
|
||||
int GetVersion() const;
|
||||
void SetVersion(int schema) const;
|
||||
int MapSchema(const QString &ver);
|
||||
|
||||
Reference in New Issue
Block a user