From b67344233b509c97ba118a209e82386d698ba068 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Thu, 05 Apr 2012 05:09:17 -0400
Subject: [PATCH] Merged revisions 2943-3026 from stable branch.

---
 interface/web/monitor/show_sys_state.php |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/interface/web/monitor/show_sys_state.php b/interface/web/monitor/show_sys_state.php
index 4219fbf..6d30fb9 100644
--- a/interface/web/monitor/show_sys_state.php
+++ b/interface/web/monitor/show_sys_state.php
@@ -196,7 +196,10 @@
 	$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']);
@@ -299,8 +302,8 @@
 /*
 * 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
@@ -574,6 +577,8 @@
 	if ($type == 'rkhunter') {
 		/* this type has no state */
 	}
+	
+	return array('serverState' => $serverState,'messages' => $messages);
 }
 
 /*

--
Gitblit v1.9.1