Use Config helper (#10339)

remove usage of global variable
This commit is contained in:
Tony Murray
2019-06-23 00:29:12 -05:00
committed by GitHub
parent 342acf50f1
commit f3ba8947f7
367 changed files with 1589 additions and 1857 deletions

View File

@@ -88,7 +88,7 @@ if (isset($_REQUEST['search'])) {
'device_ports' => $num_ports,
'device_image' => getIcon($result),
'device_hardware' => $result['hardware'],
'device_os' => $config['os'][$result['os']]['text'],
'device_os' => \LibreNMS\Config::getOsSetting($result['os'], 'text'),
'version' => $result['version'],
'location' => $result['location'],
);
@@ -243,7 +243,7 @@ if (isset($_REQUEST['search'])) {
'colours' => $highlight_colour,
'device_image' => getIcon($result),
'device_hardware' => $result['hardware'],
'device_os' => $config['os'][$result['os']]['text'],
'device_os' => \LibreNMS\Config::getOsSetting($result['os'], 'text'),
'version' => $result['version'],
'location' => $result['location'],
);
@@ -289,7 +289,7 @@ if (isset($_REQUEST['search'])) {
'colours' => $highlight_colour,
'device_image' => getIcon($result),
'device_hardware' => $result['hardware'],
'device_os' => $config['os'][$result['os']]['text'],
'device_os' => \LibreNMS\Config::getOsSetting($result['os'], 'text'),
'version' => $result['version'],
'location' => $result['location'],
'plugin' => $result['mplug_type'],