From d8faa4e7e3fb74e554f6c9339f6fe4e2883c3bf1 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Fri, 18 Sep 2015 13:43:03 -0400
Subject: [PATCH] Fix by dirkd: Since file() doesn't remove "\n" from the lines read the condition $lines[$l] == '' never evaluated to true. So $mailHeaders would always contain every line from the template while $mailBody contained none of them.
---
interface/web/monitor/show_sys_state.php | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/interface/web/monitor/show_sys_state.php b/interface/web/monitor/show_sys_state.php
index 480dd17..53997bc 100644
--- a/interface/web/monitor/show_sys_state.php
+++ b/interface/web/monitor/show_sys_state.php
@@ -191,7 +191,7 @@
/*
* Get all monitoring-data from the server and process then
*/
- $records = $app->db->queryAllRecords("SELECT DISTINCT type, data FROM monitor_data WHERE server_id = " . $serverId);
+ $records = $app->db->queryAllRecords("SELECT DISTINCT type, data FROM monitor_data WHERE server_id = ?", $serverId);
$osData = null;
$veInfo = null;
$ispcData = null;
@@ -320,7 +320,7 @@
* state
*/
// get the State from the DB
- $record = $app->db->queryOneRecord("SELECT state FROM monitor_data WHERE type = '" . $type . "' and server_id = " . $serverId . " order by created desc");
+ $record = $app->db->queryOneRecord("SELECT state FROM monitor_data WHERE type = ? and server_id = ? order by created desc", $type, $serverId);
// change the new state to the highest state
/*
--
Gitblit v1.9.1