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

@@ -116,7 +116,7 @@ if ($enabled == 1) {
$post = curl_init();
set_curl_proxy($post);
curl_setopt($post, CURLOPT_URL, $config['callback_post']);
curl_setopt($post, CURLOPT_URL, \LibreNMS\Config::get('callback_post'));
curl_setopt($post, CURLOPT_POST, count($submit));
curl_setopt($post, CURLOPT_POSTFIELDS, $fields);
curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);
@@ -127,7 +127,7 @@ if ($enabled == 1) {
$clear = curl_init();
set_curl_proxy($clear);
curl_setopt($clear, CURLOPT_URL, $config['callback_clear']);
curl_setopt($clear, CURLOPT_URL, \LibreNMS\Config::get('callback_clear'));
curl_setopt($clear, CURLOPT_POST, count($clear));
curl_setopt($clear, CURLOPT_POSTFIELDS, $fields);
curl_setopt($clear, CURLOPT_RETURNTRANSFER, 1);