mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-26 23:30:20 +01: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:
@@ -24,7 +24,7 @@
|
||||
/*
|
||||
* Current Database Version
|
||||
*/
|
||||
#define RD_VERSION_DATABASE 264
|
||||
#define RD_VERSION_DATABASE 265
|
||||
|
||||
|
||||
#endif // DBVERSION_H
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -39,6 +39,8 @@ class RDSystem
|
||||
void setIsciXreferencePath(const QString &str) const;
|
||||
QString tempCartGroup() const;
|
||||
void setTempCartGroup(const QString &str) const;
|
||||
bool showUserList() const;
|
||||
void setShowUserList(bool state) const;
|
||||
QString xml() const;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user