From f0dfa9f4bb885178de0dde42eebc4e5e5321bef2 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Fri, 05 Jun 2015 04:50:05 -0400
Subject: [PATCH] - added http -> https rewriting - backported patches

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

diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index 4e25d38..ce3d4bb 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);
 	}
 

--
Gitblit v1.9.1