mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
* fix some warnings when cache is disabled on status thing
This commit is contained in:
parent
d3e3efd05e
commit
24319ddc7a
@ -147,10 +147,17 @@ function updateStatus() {
|
||||
$status['clientVersion'] = $serverStatus->getClientVersion();
|
||||
}
|
||||
|
||||
if($cache->enabled())
|
||||
if($cache->enabled()) {
|
||||
$cache->set('status', serialize($status), 120);
|
||||
|
||||
foreach($status as $key => $value) {
|
||||
updateDatabaseConfig('status_' . $key, $value);
|
||||
}
|
||||
}
|
||||
|
||||
$tmpVal = null;
|
||||
foreach($status as $key => $value) {
|
||||
if(fetchDatabaseConfig('status_' . $key, $tmpVal)) {
|
||||
updateDatabaseConfig('status_' . $key, $value);
|
||||
}
|
||||
else {
|
||||
registerDatabaseConfig('status_' . $key, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user