mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 17:59:22 +02:00
Fix bug where server_config table does not exist (OTHire as an example)
Happened in Usage_Statistics class Thanks for reporting the OtLand user - Olddies
This commit is contained in:
parent
a4bccbaa34
commit
dacc5b9dab
@ -40,11 +40,13 @@ class Usage_Statistics {
|
|||||||
$ret['myaac_version'] = MYAAC_VERSION;
|
$ret['myaac_version'] = MYAAC_VERSION;
|
||||||
$ret['myaac_db_version'] = DATABASE_VERSION;
|
$ret['myaac_db_version'] = DATABASE_VERSION;
|
||||||
|
|
||||||
|
if(tableExist('server_config')) {
|
||||||
$query = $db->query('SELECT `value` FROM `server_config` WHERE `config` = ' . $db->quote('database_version'));
|
$query = $db->query('SELECT `value` FROM `server_config` WHERE `config` = ' . $db->quote('database_version'));
|
||||||
if($query->rowCount() == 1) {
|
if($query->rowCount() == 1) {
|
||||||
$query = $query->fetch();
|
$query = $query->fetch();
|
||||||
$ret['otserv_db_version'] = $query['value'];
|
$ret['otserv_db_version'] = $query['value'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$ret['client_version'] = $config['client'];
|
$ret['client_version'] = $config['client'];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user