mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Reverse the logic to make it clearer what is happening
This commit is contained in:
@ -201,11 +201,11 @@ function poll_device($device, $options)
|
||||
|
||||
foreach (dbFetch("SELECT `graph` FROM `device_graphs` WHERE `device_id` = ?", array($device['device_id'])) as $graph)
|
||||
{
|
||||
if (!isset($graphs[$graph["graph"]]))
|
||||
if (isset($graphs[$graph["graph"]]))
|
||||
{
|
||||
dbDelete('device_graphs', "`device_id` = ? AND `graph` = ?", array($device['device_id'], $graph["graph"]));
|
||||
} else {
|
||||
$oldgraphs[$graph["graph"]] = TRUE;
|
||||
} else {
|
||||
dbDelete('device_graphs', "`device_id` = ? AND `graph` = ?", array($device['device_id'], $graph["graph"]));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user