mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Sensors remove reliance on global variable (#16344)
* Sensors remove reliance on global variable * Apply fixes from StyleCI * Clear the instance instead of reset. Remove $valid['sensors'] from docs --------- Co-authored-by: Tony Murray <murrant@users.noreply.github.com>
This commit is contained in:
@@ -105,6 +105,7 @@ global $device;
|
||||
foreach (dbFetchRows("SELECT * FROM `devices` WHERE disabled = 0 $where ORDER BY device_id DESC", $sqlparams) as $device) {
|
||||
$device_start = microtime(true);
|
||||
DeviceCache::setPrimary($device['device_id']);
|
||||
App::forgetInstance('sensor-discovery');
|
||||
|
||||
if (discover_device($device, $module_override)) {
|
||||
$discovered_devices++;
|
||||
|
Reference in New Issue
Block a user