mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-11 14:40:46 +00:00
commit
658411f8b4
2 changed files with 35 additions and 32 deletions
|
@ -1,6 +1,8 @@
|
|||
# Release Notes
|
||||
|
||||
## [Unreleased](https://github.com/pixelfed/pixelfed/compare/v0.11.0...dev)
|
||||
### Updated
|
||||
- Updated PrettyNumber, fix deprecated warning. ([20ec870b](https://github.com/pixelfed/pixelfed/commit/20ec870b))
|
||||
|
||||
## [v0.11.0 (2021-06-01)](https://github.com/pixelfed/pixelfed/compare/v0.10.10...v0.11.0)
|
||||
### Added
|
||||
|
|
|
@ -14,7 +14,8 @@ class PrettyNumber
|
|||
foreach ($abbrevs as $exponent => $abbrev) {
|
||||
if(abs($number) >= pow(10, $exponent)) {
|
||||
$display = $number / pow(10, $exponent);
|
||||
$decimals = !$showDecimals ? 0 : ($exponent >= 3 && round($display) < 100) ? 1 : 0;
|
||||
$decimals = ($exponent >= 3 && round($display) < 100) ? 1 : 0;
|
||||
$decimals = !$showDecimals ? 0 : $decimals;
|
||||
$number = number_format($display, $decimals).$abbrev;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue