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

@@ -13,7 +13,7 @@
$init_modules = array('web', 'auth');
require realpath(__DIR__ . '/..') . '/includes/init.php';
if (is_numeric($_GET['id']) && ($config['allow_unauth_graphs'] || port_permitted($_GET['id']))) {
if (is_numeric($_GET['id']) && (\LibreNMS\Config::get('allow_unauth_graphs') || port_permitted($_GET['id']))) {
$port = cleanPort(get_port_by_id($_GET['id']));
$device = device_by_id_cache($port['device_id']);
$title = generate_device_link($device);