[ANY] Предупреждение если не сконфигурирована связь с таблицей users

This commit is contained in:
Gravit 2020-08-02 05:25:25 +07:00
parent 1fbad1cfa0
commit 11e50e065c
No known key found for this signature in database
GPG key ID: 98A079490768CCE5

View file

@ -35,10 +35,12 @@ public void init() {
sqlCreateHardware = String.format("INSERT INTO `%s` (`publickey`, `hwDiskId`, `baseboardSerialNumber`, `displayId`, `bitness`, `totalMemory`, `logicalProcessors`, `physicalProcessors`, `processorMaxFreq`, `battery`, `banned`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, '0')", tableHWID);
sqlCreateHWIDLog = String.format("INSERT INTO %s (`hwidId`, `newPublicKey`) VALUES (?, ?)", tableHWIDLog);
sqlUpdateHardware = String.format("UPDATE %s SET `publicKey` = ? WHERE `id` = ?", tableHWID);
if(tableUsers != null && usersHWIDColumn != null && usersNameColumn != null)
{
if(tableUsers != null && usersHWIDColumn != null && usersNameColumn != null) {
sqlUpdateUsers = String.format("UPDATE %s SET `%s` = ? WHERE `%s` = ?", tableUsers, usersHWIDColumn, usersNameColumn);
}
else {
LogHelper.warning("[MysqlHWIDProvider] Link to users table not configured");
}
}
@Override