| | |
| | | $ispcData = null; |
| | | foreach($records as $record) { |
| | | /* get the state from the db-data */ |
| | | _processDbState($record['type'], $serverId, $serverState, $messages); |
| | | $tmp = _processDbState($record['type'], $serverId, $serverState, $messages); |
| | | $serverState = $tmp['serverState']; |
| | | $messages = $tmp['messages']; |
| | | |
| | | /* if we have the os-info, get it */ |
| | | if ($record['type'] == 'os_info') { |
| | | $osData = unserialize($record['data']); |
| | |
| | | /* |
| | | * gets the state from the db and process it |
| | | */ |
| | | function _processDbState($type, $serverId, $serverState, $messages) { |
| | | global $app; |
| | | function _processDbState($type, $serverId) { |
| | | global $app, $serverState, $messages; |
| | | |
| | | /* |
| | | * Always the NEWEST record of each monitoring is responsible for the |
| | |
| | | if ($type == 'rkhunter') { |
| | | /* this type has no state */ |
| | | } |
| | | |
| | | return array('serverState' => $serverState,'messages' => $messages); |
| | | } |
| | | |
| | | /* |