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

@@ -35,7 +35,7 @@ $type = $_REQUEST['type'];
switch ($type) {
case 'poller':
$cmd = ['php', $config['install_dir'] . '/poller.php', '-h', $hostname, '-r', '-f', '-d'];
$cmd = ['php', \LibreNMS\Config::get('install_dir') . '/poller.php', '-h', $hostname, '-r', '-f', '-d'];
$filename = "poller-$hostname.txt";
break;
case 'snmpwalk':
@@ -46,7 +46,7 @@ switch ($type) {
$filename = $device['os'] . '-' . $device['hostname'] . '.snmpwalk';
break;
case 'discovery':
$cmd = ['php', $config['install_dir'] . '/discovery.php', '-h', $hostname, '-d'];
$cmd = ['php', \LibreNMS\Config::get('install_dir') . '/discovery.php', '-h', $hostname, '-d'];
$filename = "discovery-$hostname.txt";
break;
default: