mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-02 00:32:09 +02:00
fix fanspeeds if no fans in database
git-svn-id: http://www.observium.org/svn/observer/trunk@816 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -95,8 +95,8 @@ if ($device['os'] == "linux")
|
||||
## Delete removed sensors
|
||||
|
||||
$sql = "SELECT * FROM fanspeed AS V, devices AS D WHERE V.fan_host = D.device_id AND D.device_id = '".$device['device_id']."'";
|
||||
$query = mysql_query($sql);
|
||||
|
||||
if ($query = mysql_query($sql))
|
||||
{
|
||||
while ($sensor = mysql_fetch_array($query))
|
||||
{
|
||||
unset($exists);
|
||||
@@ -114,6 +114,7 @@ while ($sensor = mysql_fetch_array($query))
|
||||
mysql_query("DELETE FROM fanspeed WHERE fan_id = '" . $sensor['fan_id'] . "'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unset($fan_exists); echo("\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user