refactor: Use the Config class includes/discovery (#7299)

* refactor: use the Config class includes/discovery

* fix issue with $config variable not accessible in include-dir.inc.php

* improved whitespace

* Tidy up discovery_by_ip
This commit is contained in:
Tony Murray
2017-09-11 15:26:41 -05:00
committed by Neil Lathwood
parent 9cafcb6280
commit b18c41b1a9
26 changed files with 192 additions and 162 deletions

View File

@@ -1,8 +1,9 @@
<?php
use LibreNMS\Config;
use LibreNMS\Util\IP;
if ($config['enable_bgp']) {
if (Config::get('enable_bgp')) {
if (key_exists('vrf_lite_cisco', $device) && (count($device['vrf_lite_cisco'])!=0)) {
$vrfs_lite_cisco = $device['vrf_lite_cisco'];
} else {