mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-17 16:11:12 +02:00
2022-10-06 Fred Gleason <fredg@paravelsystems.com>
* Changed the type of the 'REPLICATORS.URL_PASSWORD` field in the database to 'text'. * Applied Base64 encoding to the 'REPLICATORS.URL_PASSWORD' field in the database. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -157,13 +157,13 @@ void RDReplicator::setUrlUsername(const QString &str) const
|
||||
|
||||
QString RDReplicator::urlPassword() const
|
||||
{
|
||||
return GetValue("URL_PASSWORD").toString();
|
||||
return QByteArray::fromBase64(GetValue("URL_PASSWORD").toString().toUtf8());
|
||||
}
|
||||
|
||||
|
||||
void RDReplicator::setUrlPassword(const QString &str) const
|
||||
{
|
||||
SetRow("URL_PASSWORD",str);
|
||||
SetRow("URL_PASSWORD",str.toUtf8().toBase64());
|
||||
}
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ QVariant RDReplicator::GetValue(const QString &field) const
|
||||
}
|
||||
|
||||
|
||||
void RDReplicator::SetRow(const QString ¶m,QString value) const
|
||||
void RDReplicator::SetRow(const QString ¶m,const QString &value) const
|
||||
{
|
||||
QString sql;
|
||||
|
||||
@@ -238,6 +238,24 @@ void RDReplicator::SetRow(const QString ¶m,QString value) const
|
||||
}
|
||||
|
||||
|
||||
void RDReplicator::SetRow(const QString ¶m,const QByteArray &value) const
|
||||
{
|
||||
QString sql;
|
||||
|
||||
if(value.size()==0) {
|
||||
sql=QString("update `REPLICATORS` set `")+
|
||||
param+"`=NULL where "+
|
||||
"`NAME`='"+RDEscapeString(replicator_name)+"'";
|
||||
}
|
||||
else {
|
||||
sql=QString("update `REPLICATORS` set `")+
|
||||
param+"`='"+RDEscapeString(value)+"' where "+
|
||||
"`NAME`='"+RDEscapeString(replicator_name)+"'";
|
||||
}
|
||||
RDSqlQuery::apply(sql);
|
||||
}
|
||||
|
||||
|
||||
void RDReplicator::SetRow(const QString ¶m,int value) const
|
||||
{
|
||||
QString sql;
|
||||
|
Reference in New Issue
Block a user