From d35b34d03ffe0d92cbaeb4410c913550150fab4e Mon Sep 17 00:00:00 2001 From: Marius Cramer <m.cramer@pixcept.de> Date: Mon, 04 May 2015 13:56:31 -0400 Subject: [PATCH] - prepared layout change for login page --- server/lib/classes/monitor_tools.inc.php | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php index c1ac461..13c0f8d 100644 --- a/server/lib/classes/monitor_tools.inc.php +++ b/server/lib/classes/monitor_tools.inc.php @@ -62,6 +62,9 @@ $mainver = array_filter($mainver); $mainver = current($mainver).'.'.next($mainver); switch ($mainver){ + case "14.10": + $relname = "(Utopic Unicorn)"; + break; case "14.04": $relname = "(Trusty Tahr)"; break; @@ -256,7 +259,7 @@ $server_id = intval($conf['server_id']); /** get the "active" Services of the server from the DB */ - $services = $app->db->queryOneRecord('SELECT * FROM server WHERE server_id = ' . $server_id); + $services = $app->db->queryOneRecord('SELECT * FROM server WHERE server_id = ?', $server_id); /* * If the DB is down, we have to set the db to "yes". * If we don't do this, then the monitor will NOT monitor, that the db is down and so the @@ -667,12 +670,12 @@ */ $sql = 'DELETE FROM monitor_data ' . 'WHERE ' . - ' type =' . "'" . $app->dbmaster->quote($type) . "' " . + ' type = ?' . 'AND ' . - ' created < ' . $old . ' ' . + ' created < ? ' . 'AND ' . - ' server_id = ' . $serverId; - $app->dbmaster->query($sql); + ' server_id = ?'; + $app->dbmaster->query($sql, $type, $old, $serverId); } public function send_notification_email($template, $placeholders, $recipients) { -- Gitblit v1.9.1