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

@@ -87,8 +87,8 @@ foreach (dbFetchRows('SELECT * FROM pseudowires AS P, ports AS I, devices AS D W
if ($pw_a) {
$pw_a['width'] = '150';
$pw_a['height'] = '30';
$pw_a['from'] = $config['time']['day'];
$pw_a['to'] = $config['time']['now'];
$pw_a['from'] = \LibreNMS\Config::get('time.day');
$pw_a['to'] = \LibreNMS\Config::get('time.now');
$pw_a['bg'] = $bg;
$types = array('bits', 'upkts', 'errors');
foreach ($types as $graph_type) {
@@ -102,8 +102,8 @@ foreach (dbFetchRows('SELECT * FROM pseudowires AS P, ports AS I, devices AS D W
if ($pw_b) {
$pw_b['width'] = '150';
$pw_b['height'] = '30';
$pw_b['from'] = $config['time']['day'];
$pw_b['to'] = $config['time']['now'];
$pw_b['from'] = \LibreNMS\Config::get('time.day');
$pw_b['to'] = \LibreNMS\Config::get('time.now');
$pw_b['bg'] = $bg;
$types = array('bits', 'upkts', 'errors');
foreach ($types as $graph_type) {