Skip to content

Commit

Permalink
Merge pull request #17 from TomSpeak/multi-choice-fix
Browse files Browse the repository at this point in the history
FIX Allowing multiple choice votes
  • Loading branch information
mateusz committed Jan 26, 2014
2 parents 2b34c97 + 224515c commit 782733f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion code/PollChoice.php
Expand Up @@ -52,7 +52,6 @@ function addVote() {
if($poll && !$poll->isVoted()) {
$this->Votes++;
$this->write();
$poll->markAsVoted();
}
}

Expand Down
1 change: 1 addition & 0 deletions code/PollForm.php
Expand Up @@ -63,6 +63,7 @@ function submitPoll($data, $form) {
foreach($choices as $choice) {
$choice->addVote();
}
$form->poll->markAsVoted();
}

// Redirect back to anchor (partly copied from Director::redirectBack)
Expand Down

0 comments on commit 782733f

Please sign in to comment.