From 91aaafb01efb366213cd46cd61b9e70f46586a21 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Fri, 24 Feb 2012 09:17:10 -0500
Subject: [PATCH] Fixed: FS#2057 - Webdav User Password can't contain special chars

---
 server/lib/classes/monitor_tools.inc.php |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index d6cd3a5..dab75b5 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -879,7 +879,7 @@
 			/*
 			 * Fetch the output
 			 */
-			$data['output'] = shell_exec('zypper --non-interactive up');
+			$data['output'] = shell_exec('zypper lu');
 		} else {
 			/*
 			 * It is not Debian/Ubuntu, so there is no data and no state
@@ -1020,7 +1020,7 @@
 				/*
 				 * Fetch the output
 				 */
-				$data['output'] = shell_exec('mpt-status --autoload -n');
+				$data['output'] = shell_exec('mpt-status --autoload');
 
 				/*
 				 * Then calc the state.
@@ -1032,7 +1032,7 @@
 						* The output contains information for every RAID and every HDD.
 						* We only need the state of the RAID
 						*/
-						if (strpos($item, 'raidlevel:') !== false) {
+						if (strpos($item, 'state ') !== false) {
 							/*
 							* We found a raid, process the state of it
 							*/
@@ -1722,6 +1722,8 @@
 				// fwrite($fp, "GET / HTTP/1.0\r\n\r\n");
 				$out = "GET / HTTP/1.1\r\n";
 				$out .= "Host: localhost\r\n";
+				$out .= "User-Agent: Mozilla/5.0 (ISPConfig monitor)\r\n";
+				$out .= "Accept: application/xml,application/xhtml+xml,text/html\r\n";
 				$out .= "Connection: Close\r\n\r\n";
 				fwrite($fp, $out);
 				stream_set_timeout($fp, 5); // Timeout after 5 seconds

--
Gitblit v1.9.1