mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Remove some lightly used or unused dbFacile functions (#15418)
* Remove some lightly used or unused dbFacile functions ['NULL'] legacy behavior seems unsupported, replace with actual nulls * Fix refactor mishap * another * update baseline * these were very wrong... what happened?
This commit is contained in:
@@ -295,7 +295,7 @@ function discover_sensor(&$valid, $class, $device, $oid, $index, $type, $descr,
|
||||
}
|
||||
|
||||
if ((string) $high_limit != (string) $sensor_entry['sensor_limit'] && $sensor_entry['sensor_custom'] == 'No') {
|
||||
$update = ['sensor_limit' => ($high_limit == null ? ['NULL'] : $high_limit)];
|
||||
$update = ['sensor_limit' => $high_limit];
|
||||
$updated = dbUpdate($update, 'sensors', '`sensor_id` = ?', [$sensor_entry['sensor_id']]);
|
||||
d_echo("( $updated updated )\n");
|
||||
|
||||
@@ -304,7 +304,7 @@ function discover_sensor(&$valid, $class, $device, $oid, $index, $type, $descr,
|
||||
}
|
||||
|
||||
if ((string) $sensor_entry['sensor_limit_low'] != (string) $low_limit && $sensor_entry['sensor_custom'] == 'No') {
|
||||
$update = ['sensor_limit_low' => ($low_limit == null ? ['NULL'] : $low_limit)];
|
||||
$update = ['sensor_limit_low' => $low_limit];
|
||||
$updated = dbUpdate($update, 'sensors', '`sensor_id` = ?', [$sensor_entry['sensor_id']]);
|
||||
d_echo("( $updated updated )\n");
|
||||
|
||||
@@ -313,7 +313,7 @@ function discover_sensor(&$valid, $class, $device, $oid, $index, $type, $descr,
|
||||
}
|
||||
|
||||
if ((string) $warn_limit != (string) $sensor_entry['sensor_limit_warn'] && $sensor_entry['sensor_custom'] == 'No') {
|
||||
$update = ['sensor_limit_warn' => ($warn_limit == null ? ['NULL'] : $warn_limit)];
|
||||
$update = ['sensor_limit_warn' => $warn_limit];
|
||||
$updated = dbUpdate($update, 'sensors', '`sensor_id` = ?', [$sensor_entry['sensor_id']]);
|
||||
d_echo("( $updated updated )\n");
|
||||
|
||||
@@ -322,7 +322,7 @@ function discover_sensor(&$valid, $class, $device, $oid, $index, $type, $descr,
|
||||
}
|
||||
|
||||
if ((string) $sensor_entry['sensor_limit_low_warn'] != (string) $low_warn_limit && $sensor_entry['sensor_custom'] == 'No') {
|
||||
$update = ['sensor_limit_low_warn' => ($low_warn_limit == null ? ['NULL'] : $low_warn_limit)];
|
||||
$update = ['sensor_limit_low_warn' => $low_warn_limit];
|
||||
$updated = dbUpdate($update, 'sensors', '`sensor_id` = ?', [$sensor_entry['sensor_id']]);
|
||||
d_echo("( $updated updated )\n");
|
||||
|
||||
|
Reference in New Issue
Block a user