mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Apply fixes from StyleCI (#15203)
Co-authored-by: StyleCI Bot <bot@styleci.io>
This commit is contained in:
@ -42,7 +42,7 @@ foreach ($query->get(['bill_id', 'bill_name']) as $bill) {
|
||||
$bill_id = $bill->bill_id;
|
||||
|
||||
if ($config['distributed_poller'] && $config['distributed_billing']) {
|
||||
$port_list = dbFetchRows('SELECT * FROM `bill_ports` as P, `ports` as I, `devices` as D WHERE P.bill_id=? AND I.port_id = P.port_id AND I.ifOperStatus="up" AND D.device_id = I.device_id AND D.status=1 AND D.poller_group IN ('.$config['distributed_poller_group'].')', [$bill_id]);
|
||||
$port_list = dbFetchRows('SELECT * FROM `bill_ports` as P, `ports` as I, `devices` as D WHERE P.bill_id=? AND I.port_id = P.port_id AND I.ifOperStatus="up" AND D.device_id = I.device_id AND D.status=1 AND D.poller_group IN (' . $config['distributed_poller_group'] . ')', [$bill_id]);
|
||||
} else {
|
||||
$port_list = dbFetchRows('SELECT * FROM `bill_ports` as P, `ports` as I, `devices` as D WHERE P.bill_id=? AND I.port_id = P.port_id AND I.ifOperStatus="up" AND D.device_id = I.device_id AND D.status=1', [$bill_id]);
|
||||
}
|
||||
@ -144,7 +144,7 @@ foreach ($query->get(['bill_id', 'bill_name']) as $bill) {
|
||||
} else {
|
||||
// NOTE: casting to string for mysqli bug (fixed by mysqlnd)
|
||||
if ($config['distributed_poller'] && $config['distributed_billing']) {
|
||||
$port_count = dbFetchCell('SELECT COUNT(*) FROM `bill_ports` as P, `ports` as I, `devices` as D WHERE P.bill_id=? AND I.port_id = P.port_id AND D.device_id = I.device_id AND D.poller_group IN ('.$config['distributed_poller_group'].')', [$bill_id]);
|
||||
$port_count = dbFetchCell('SELECT COUNT(*) FROM `bill_ports` as P, `ports` as I, `devices` as D WHERE P.bill_id=? AND I.port_id = P.port_id AND D.device_id = I.device_id AND D.poller_group IN (' . $config['distributed_poller_group'] . ')', [$bill_id]);
|
||||
} else {
|
||||
$port_count = dbFetchCell('SELECT COUNT(*) FROM `bill_ports` as P, `ports` as I, `devices` as D WHERE P.bill_id=? AND I.port_id = P.port_id AND D.device_id = I.device_id', [$bill_id]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user