From 0cd87e682012f224e2b74531190bb983fdcbb430 Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Sun, 10 Jan 2016 03:31:27 -0500
Subject: [PATCH] Revert "allow 0 for ISINT"
---
server/lib/classes/monitor_tools.inc.php | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index 4e25d38..9b706ce 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -666,7 +666,7 @@
// $now = time();
// $old = $now - (4 * 60); // 4 minutes
- $old = 'UNIX_TIMESTAMP() - 240';
+ $old = 240; //seconds
/*
* ATTENTION if i do NOT pay attention of the server id, i delete all data (of the type)
@@ -676,13 +676,7 @@
* even though it is the NEWEST data of this server. To avoid this i HAVE to include
* the server-id!
*/
- $sql = 'DELETE FROM monitor_data ' .
- 'WHERE ' .
- ' type = ?' .
- 'AND ' .
- ' created < ? ' .
- 'AND ' .
- ' server_id = ?';
+ $sql = 'DELETE FROM `monitor_data` WHERE `type` = ? AND `created` < UNIX_TIMESTAMP() - ? AND `server_id` = ?';
$app->dbmaster->query($sql, $type, $old, $serverId);
}
@@ -708,7 +702,7 @@
$mailSubject = '';
$inHeader = true;
for($l = 0; $l < count($lines); $l++) {
- if($lines[$l] == '') {
+ if(trim($lines[$l]) == '') {
$inHeader = false;
continue;
}
--
Gitblit v1.9.1