Profile: Refactor rating bar. Again.

@celestora is not going to follow my idea kek
This commit is contained in:
Vladimir Barinov 2021-10-10 00:05:20 +03:00 committed by GitHub
parent 46540e08b7
commit 81e5f2ae2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -399,7 +399,10 @@ class User extends RowModel
$total = max(100 - $incompleteness + $this->getRating(), 0); $total = max(100 - $incompleteness + $this->getRating(), 0);
if(ovkGetQuirk("profile.rating-bar-behaviour") === 0) if(ovkGetQuirk("profile.rating-bar-behaviour") === 0)
$percent = intval(substr(strval($total), -2)); if ($total >= 100)
$percent = round(($total / 10**strlen(strval($total))) * 100, 0);
else
$percent = min($total, 100);
else else
$percent = min($total, 100); $percent = min($total, 100);