mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
Fix pelmeni moment
This commit is contained in:
parent
f2ca6be4d5
commit
5203229e9e
1 changed files with 2 additions and 2 deletions
|
@ -103,7 +103,7 @@ class Poll extends Attachable
|
|||
$option->name = $title;
|
||||
|
||||
$option->votes = $this->getVoterCount($id);
|
||||
$option->pct = $result->totalVotes == 0 ? 0 : (($option->votes / $result->totalVotes) * 100);
|
||||
$option->pct = $result->totalVotes == 0 ? 0 : min(100, floor(($option->votes / $result->totalVotes) * 100));
|
||||
$option->voters = $this->getVoters($id, 1, 10);
|
||||
if(!$user || !$voted)
|
||||
$option->voted = NULL;
|
||||
|
|
Loading…
Reference in a new issue