mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-13 06:03:37 +02:00
2017-07-14 Fred Gleason <fredg@paravelsystems.com>
* Added a 'SYSTEM.SHOW_USER_LIST' field to the database. * Incremented the database version to 265. * Added 'RDSystem::showUserList()' and 'RDSystem::setShowUserList()' methods in 'lib/rdsystem.cpp' and 'lib/rdsystem.h'. * Added a 'Show User List in RDLogin' control to the 'Edit System' dialog in 'rdadmin/edit_settings.cpp' and 'rdadmin/edit_settings.h'. * Altered RDLogin to display a text input field for the user name when 'Show User List in RDLogin' is unchecked.
This commit is contained in:
@@ -146,6 +146,34 @@ void RDSystem::setTempCartGroup(const QString &str) const
|
||||
}
|
||||
|
||||
|
||||
bool RDSystem::showUserList() const
|
||||
{
|
||||
bool ret=false;
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
|
||||
sql="select SHOW_USER_LIST from SYSTEM";
|
||||
q=new RDSqlQuery(sql);
|
||||
if(q->first()) {
|
||||
ret=RDBool(q->value(0).toString());
|
||||
}
|
||||
delete q;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void RDSystem::setShowUserList(bool state) const
|
||||
{
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
|
||||
sql=QString().sprintf("update SYSTEM set SHOW_USER_LIST=\"%s\"",
|
||||
(const char *)RDYesNo(state));
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
}
|
||||
|
||||
|
||||
QString RDSystem::xml() const
|
||||
{
|
||||
QString xml="<systemSettings>\n";
|
||||
|
Reference in New Issue
Block a user