76
70
$votes = $request->getArr('vote');
77
71
$votes = array_fuse($votes, $votes);
79
$this->updateVotes($user, $poll, $old_votes, $votes);
73
$this->updateVotes($viewer, $poll, $old_votes, $votes);
81
75
return id(new AphrontRedirectResponse())->setURI('/V'.$poll->getID());
84
private function updateVotes($user, $poll, $old_votes, $votes) {
78
private function updateVotes($viewer, $poll, $old_votes, $votes) {
85
79
if (!empty($votes) && count($votes) > 1 &&
86
80
$poll->getMethod() == PhabricatorSlowvotePoll::METHOD_PLURALITY) {
87
81
return id(new Aphront400Response());