2020-01-03 Fred Gleason <fredg@paravelsystems.com>

* Fixed a regression in the Web API that caused the
	'origindatetime', 'startdatetime' and 'enddatetime' to be incorrect
	and/or corrupt in served XML documents.
This commit is contained in:
Fred Gleason 2020-01-03 14:32:56 -05:00
parent d1125fc6a9
commit 968bf48fed
2 changed files with 11 additions and 3 deletions

View File

@ -19383,3 +19383,7 @@
* Fixed a bug in the 'rivwebcapi' validate_tm() function that caused
dates containing '29 February' to always fail regardless of leap-year
validity.
2020-01-03 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in the Web API that caused the
'origindatetime', 'startdatetime' and 'enddatetime' to be incorrect
and/or corrupt in served XML documents.

View File

@ -1448,6 +1448,10 @@ void RDCut::disconnect(QObject *receiver,const char *member) const
QString RDCut::xml(RDSqlQuery *q,bool absolute,RDSettings *settings)
{
//
// The 'RDSqlQuery *q' query should be generated using the field
// definitions provided by 'RDCart::xmlSql()'.
//
QString xml="";
xml+="<cut>\n";
@ -1465,19 +1469,19 @@ QString RDCut::xml(RDSqlQuery *q,bool absolute,RDSettings *settings)
xml+=" "+RDXmlField("originDatetime","");
}
else {
xml+=" "+RDXmlField("originDatetime",q->value(36).toDateTime());
xml+=" "+RDXmlField("originDatetime",q->value(38).toDateTime());
}
if(q->value(39).isNull()) {
xml+=" "+RDXmlField("startDatetime","");
}
else {
xml+=" "+RDXmlField("startDatetime",q->value(37).toDateTime());
xml+=" "+RDXmlField("startDatetime",q->value(39).toDateTime());
}
if(q->value(40).isNull()) {
xml+=" "+RDXmlField("endDatetime","");
}
else {
xml+=" "+RDXmlField("endDatetime",q->value(38).toDateTime());
xml+=" "+RDXmlField("endDatetime",q->value(40).toDateTime());
}
xml+=" "+RDXmlField("sun",RDBool(q->value(41).toString()));
xml+=" "+RDXmlField("mon",RDBool(q->value(42).toString()));