From c3b3d5ee32fccb0b09d379747dac867193e23133 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Fri, 15 Jan 2010 11:43:26 +0000 Subject: [PATCH] update TME description git-svn-id: http://www.observium.org/svn/observer/trunk@691 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/discovery/temperatures.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/discovery/temperatures.php b/includes/discovery/temperatures.php index 1e3c18a72..9e8784d29 100755 --- a/includes/discovery/temperatures.php +++ b/includes/discovery/temperatures.php @@ -51,7 +51,12 @@ $query = "INSERT INTO temperature (`temp_host`, `temp_oid`, `temp_descr`, `temp_tenths`) values ('$id', '$temp_oid', '$descr',1)"; mysql_query($query); echo("+"); - } else { echo("."); } + } elseif (mysql_result(mysql_query("SELECT `temp_descr` FROM temperature WHERE `temp_host` = '$id' AND `temp_oid` = '$temp_oid'"), 0) != $descr) { + echo("U"); + mysql_query("UPDATE temperature SET `temp_descr` = '$descr' WHERE `temp_host` = '$id' AND `temp_oid` = '$temp_oid'"); + } else { + echo("."); + } $temp_exists[] = "$id $temp_oid"; } }