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

@@ -59,8 +59,8 @@ foreach (dbFetchRows($sql, $param) as $mempool) {
$used = formatStorage($mempool['mempool_used']);
$graph_array['type'] = $graph_type;
$graph_array['id'] = $mempool['mempool_id'];
$graph_array['from'] = $config['time']['day'];
$graph_array['to'] = $config['time']['now'];
$graph_array['from'] = \LibreNMS\Config::get('time.day');
$graph_array['to'] = \LibreNMS\Config::get('time.now');
$graph_array['height'] = '20';
$graph_array['width'] = '80';
$graph_array_zoom = $graph_array;
@@ -81,7 +81,7 @@ foreach (dbFetchRows($sql, $param) as $mempool) {
if ($vars['view'] == 'graphs') {
$graph_array['height'] = '100';
$graph_array['width'] = '216';
$graph_array['to'] = $config['time']['now'];
$graph_array['to'] = \LibreNMS\Config::get('time.now');
$graph_array['id'] = $mempool['mempool_id'];
$graph_array['type'] = $graph_type;
$return_data = true;