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
+1 -2
View File
@@ -31,9 +31,8 @@
*/
function get_notifications()
{
global $config;
$obj = array();
foreach ($config['notifications'] as $name => $url) {
foreach (\LibreNMS\Config::get('notifications') as $name => $url) {
echo '[ '.date('r').' ] '.$url.' ';
$feed = json_decode(json_encode(simplexml_load_string(file_get_contents($url))), true);
if (isset($feed['channel'])) {