2
0
mirror of https://github.com/slawkens/myaac.git synced 2025-05-15 18:39:20 +02:00

* fix some warnings when cache is disabled on status thing

This commit is contained in:
slawkens 2019-04-24 12:09:05 +02:00
parent d3e3efd05e
commit 24319ddc7a

@ -147,10 +147,17 @@ function updateStatus() {
$status['clientVersion'] = $serverStatus->getClientVersion(); $status['clientVersion'] = $serverStatus->getClientVersion();
} }
if($cache->enabled()) if($cache->enabled()) {
$cache->set('status', serialize($status), 120); $cache->set('status', serialize($status), 120);
}
$tmpVal = null;
foreach($status as $key => $value) { foreach($status as $key => $value) {
updateDatabaseConfig('status_' . $key, $value); if(fetchDatabaseConfig('status_' . $key, $tmpVal)) {
updateDatabaseConfig('status_' . $key, $value);
}
else {
registerDatabaseConfig('status_' . $key, $value);
}
} }
} }