mirror of
https://github.com/slawkens/myaac.git
synced 2025-11-29 22:46:51 +01:00
* fix some warnings when cache is disabled on status thing
This commit is contained in:
@@ -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) {
|
||||||
|
if(fetchDatabaseConfig('status_' . $key, $tmpVal)) {
|
||||||
updateDatabaseConfig('status_' . $key, $value);
|
updateDatabaseConfig('status_' . $key, $value);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
registerDatabaseConfig('status_' . $key, $value);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user