mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Remove some lightly used or unused dbFacile functions (#15418)
* Remove some lightly used or unused dbFacile functions ['NULL'] legacy behavior seems unsupported, replace with actual nulls * Fix refactor mishap * another * update baseline * these were very wrong... what happened?
This commit is contained in:
@@ -22,7 +22,7 @@ Debug::set($_REQUEST['debug']);
|
||||
if (is_numeric($_GET['device_id'])) {
|
||||
// use php to sort since we need call cleanPort
|
||||
$interface_map = [];
|
||||
foreach (dbFetch('SELECT * FROM ports WHERE device_id = ?', [$_GET['device_id']]) as $interface) {
|
||||
foreach (dbFetchRows('SELECT * FROM ports WHERE device_id = ?', [$_GET['device_id']]) as $interface) {
|
||||
$interface = cleanPort($interface);
|
||||
$interface_map[$interface['label']] = $interface;
|
||||
}
|
||||
|
@@ -55,9 +55,9 @@ if (isset($_GET['format']) && preg_match('/^[a-z]*$/', $_GET['format'])) {
|
||||
} else {
|
||||
$locations = getlocations();
|
||||
$loc_count = 1;
|
||||
foreach (dbFetch('SELECT *, locations.location FROM devices LEFT JOIN locations ON devices.location_id = locations.id WHERE 1 ' . $where, $param) as $device) {
|
||||
foreach (dbFetchRows('SELECT *, locations.location FROM devices LEFT JOIN locations ON devices.location_id = locations.id WHERE 1 ' . $where, $param) as $device) {
|
||||
if ($device) {
|
||||
$links = dbFetch('SELECT * from ports AS I, links AS L WHERE I.device_id = ? AND L.local_port_id = I.port_id ORDER BY L.remote_hostname', [$device['device_id']]);
|
||||
$links = dbFetchRows('SELECT * from ports AS I, links AS L WHERE I.device_id = ? AND L.local_port_id = I.port_id ORDER BY L.remote_hostname', [$device['device_id']]);
|
||||
if (count($links)) {
|
||||
if ($anon) {
|
||||
$device['hostname'] = md5($device['hostname']);
|
||||
|
Reference in New Issue
Block a user