mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-12 07:35:55 +01: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:
@@ -2011,6 +2011,20 @@ QString RDCart::uniqueCartTitle(unsigned cartnum)
|
||||
}
|
||||
|
||||
|
||||
bool RDCart::titleIsUnique(const QString &str)
|
||||
{
|
||||
bool ret=false;
|
||||
|
||||
QString sql=QString("select NUMBER from CART where ")+
|
||||
"TITLE=\""+RDEscapeString(str)+"\"";
|
||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||
ret=!q->first();
|
||||
delete q;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
QVariant RDCart::GetXmlValue(const QString &tag,const QString &line)
|
||||
{
|
||||
bool ok=false;
|
||||
|
||||
Reference in New Issue
Block a user