mirror of
https://github.com/openvk/openvk
synced 2024-12-22 16:42:32 +03:00
Profile: Refactor rating bar. Again.
@celestora is not going to follow my idea kek
This commit is contained in:
parent
46540e08b7
commit
81e5f2ae2c
1 changed files with 4 additions and 1 deletions
|
@ -399,7 +399,10 @@ class User extends RowModel
|
|||
|
||||
$total = max(100 - $incompleteness + $this->getRating(), 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
|
||||
$percent = min($total, 100);
|
||||
|
||||
|
|
Loading…
Reference in a new issue