mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Misc fixes 42 (#15413)
* Misc Fixes * Apply fixes from StyleCI --------- Co-authored-by: StyleCI Bot <bot@styleci.io>
This commit is contained in:
@@ -38,7 +38,7 @@ foreach (dbFetchRows('SELECT * FROM `bills` ORDER BY `bill_id`') as $bill) {
|
||||
|
||||
$period = Billing::getPeriod($bill['bill_id'], $datefrom, $dateto);
|
||||
|
||||
$date_updated = str_replace('-', '', str_replace(':', '', str_replace(' ', '', $check['updated'])));
|
||||
$date_updated = $check ? str_replace(['-', ':', ' '], '', $check['updated']) : 0;
|
||||
|
||||
// Send the current dir_95th to the getRates function so it knows to aggregate or return the max in/out value and highest direction
|
||||
$dir_95th = $bill['dir_95th'];
|
||||
@@ -70,7 +70,7 @@ foreach (dbFetchRows('SELECT * FROM `bills` ORDER BY `bill_id`') as $bill) {
|
||||
$percent = Number::calculatePercent($rate_data['total_data'], $bill['bill_quota']);
|
||||
}
|
||||
|
||||
echo strftime('%x @ %X', strtotime($datefrom)) . ' to ' . strftime('%x @ %X', strtotime($dateto)) . ' ' . str_pad($type, 8) . ' ' . str_pad($allowed_text, 10) . ' ' . str_pad($used_text, 10) . ' ' . $percent . '%';
|
||||
echo \Carbon\Carbon::parse($datefrom)->toDateTimeString() . ' to ' . \Carbon\Carbon::parse($dateto)->toDateTimeString() . ' ' . str_pad($type, 8) . ' ' . str_pad($allowed_text, 10) . ' ' . str_pad($used_text, 10) . ' ' . $percent . '%';
|
||||
|
||||
if ($i == '0') {
|
||||
$update = [
|
||||
@@ -91,7 +91,7 @@ foreach (dbFetchRows('SELECT * FROM `bills` ORDER BY `bill_id`') as $bill) {
|
||||
echo ' Updated! ';
|
||||
}
|
||||
|
||||
if ($check['bill_id'] == $bill['bill_id']) {
|
||||
if (isset($check['bill_id']) && $check['bill_id'] == $bill['bill_id']) {
|
||||
$update = [
|
||||
'rate_95th' => $rate_data['rate_95th'],
|
||||
'rate_95th_in' => $rate_data['rate_95th_in'],
|
||||
|
Reference in New Issue
Block a user