Fix missing use statements (#8614)

This commit is contained in:
Tony Murray
2018-04-24 21:20:21 -05:00
committed by GitHub
parent 5675964bab
commit b41e32c7aa
5 changed files with 9 additions and 1 deletions

View File

@@ -1650,7 +1650,7 @@ function get_zfs_pools($device_id)
* Returns the sysname of a device with a html line break prepended. * Returns the sysname of a device with a html line break prepended.
* if the device has an empty sysname it will return device's hostname instead * if the device has an empty sysname it will return device's hostname instead
* And finally if the device has no hostname it will return an empty string * And finally if the device has no hostname it will return an empty string
* @param device array * @param array device
* @return string * @return string
*/ */
function get_device_name($device) function get_device_name($device)

View File

@@ -25,6 +25,8 @@
* ) * )
*/ */
use LibreNMS\Config;
if (file_exists(Config::get('install_dir') . "/includes/discovery/ntp/{$device['os_group']}.inc.php")) { if (file_exists(Config::get('install_dir') . "/includes/discovery/ntp/{$device['os_group']}.inc.php")) {
include Config::get('install_dir') . "/includes/discovery/ntp/{$device['os_group']}.inc.php"; include Config::get('install_dir') . "/includes/discovery/ntp/{$device['os_group']}.inc.php";
} }

View File

@@ -1,6 +1,8 @@
<?php <?php
// Pre-cache the existing state of VLANs for this device from the database // Pre-cache the existing state of VLANs for this device from the database
use LibreNMS\Config;
$vlans_db_raw = dbFetchRows('SELECT * FROM `vlans` WHERE `device_id` = ?', array($device['device_id'])); $vlans_db_raw = dbFetchRows('SELECT * FROM `vlans` WHERE `device_id` = ?', array($device['device_id']));
foreach ($vlans_db_raw as $vlan_db) { foreach ($vlans_db_raw as $vlan_db) {
$vlans_db[$vlan_db['vlan_domain']][$vlan_db['vlan_vlan']] = $vlan_db; $vlans_db[$vlan_db['vlan_domain']][$vlan_db['vlan_vlan']] = $vlan_db;

View File

@@ -1,5 +1,7 @@
<?php <?php
use LibreNMS\Config;
if ($config['enable_inventory']) { if ($config['enable_inventory']) {
if (file_exists(Config::get('install_dir') . "/includes/polling/entity-physical/{$device['os']}.inc.php")) { if (file_exists(Config::get('install_dir') . "/includes/polling/entity-physical/{$device['os']}.inc.php")) {
include Config::get('install_dir') . "/includes/polling/entity-physical/{$device['os']}.inc.php"; include Config::get('install_dir') . "/includes/polling/entity-physical/{$device['os']}.inc.php";

View File

@@ -18,6 +18,8 @@
* DS:dispersion:GAUGE:'.$config['rrd']['heartbeat'].':0:U * DS:dispersion:GAUGE:'.$config['rrd']['heartbeat'].':0:U
*/ */
use LibreNMS\Config;
if (file_exists(Config::get('install_dir') . "/includes/polling/ntp/{$device['os_group']}.inc.php")) { if (file_exists(Config::get('install_dir') . "/includes/polling/ntp/{$device['os_group']}.inc.php")) {
include Config::get('install_dir') . "/includes/polling/ntp/{$device['os_group']}.inc.php"; include Config::get('install_dir') . "/includes/polling/ntp/{$device['os_group']}.inc.php";
} }