mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-13 06:03:37 +02:00
2017-06-19 Fred Gleason <fredg@paravelsystems.com>
* Added a 'SYSTEM.FIX_DUP_CART_TITLES' field to the database. * Incremented the database version to 264. * Added 'RDSystem::fixDuplicateCartTitles()' and 'RDSystem::setFixDuplicateCartTitles()' methods in 'lib/rdsystem.cpp' and 'lib/rdsystem.h'. * Added an 'Auto-Correct Duplicate Cart Titles' checkbox to the 'System Settings' dialog in 'rdadmin/edit_settings.cpp' and 'rdadmin/edit_settings.h'. * Modified the 'EditCart' web call to enforce the 'Auto-Correct Duplicate Cart Titles' setting.
This commit is contained in:
@@ -69,6 +69,34 @@ void RDSystem::setAllowDuplicateCartTitles(bool state) const
|
||||
}
|
||||
|
||||
|
||||
bool RDSystem::fixDuplicateCartTitles() const
|
||||
{
|
||||
bool ret=false;
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
|
||||
sql="select FIX_DUP_CART_TITLES from SYSTEM";
|
||||
q=new RDSqlQuery(sql);
|
||||
if(q->first()) {
|
||||
ret=RDBool(q->value(0).toString());
|
||||
}
|
||||
delete q;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void RDSystem::setFixDuplicateCartTitles(bool state) const
|
||||
{
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
|
||||
sql=QString().sprintf("update SYSTEM set FIX_DUP_CART_TITLES=\"%s\"",
|
||||
(const char *)RDYesNo(state));
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
}
|
||||
|
||||
|
||||
unsigned RDSystem::maxPostLength() const
|
||||
{
|
||||
unsigned ret;
|
||||
@@ -123,6 +151,7 @@ QString RDSystem::xml() const
|
||||
QString xml="<systemSettings>\n";
|
||||
xml+=RDXmlField("sampleRate",sampleRate());
|
||||
xml+=RDXmlField("duplicateTitles",allowDuplicateCartTitles());
|
||||
xml+=RDXmlField("fixDuplicateTitles",fixDuplicateCartTitles());
|
||||
xml+=RDXmlField("maxPostLength",maxPostLength());
|
||||
xml+=RDXmlField("isciXreferencePath",isciXreferencePath());
|
||||
xml+=RDXmlField("tempCartGroup",tempCartGroup());
|
||||
|
Reference in New Issue
Block a user