Permalink
Browse files

Put reskeys actually in the right place, in vote(). Really this time.

  • Loading branch information...
1 parent 345d681 commit 2e7cbb00e039e50097b6b1f1de7e239b778f82cd @pudge pudge committed Oct 19, 2005
Showing with 7 additions and 7 deletions.
  1. +7 −7 plugins/PollBooth/pollBooth.pl
View
14 plugins/PollBooth/pollBooth.pl
@@ -408,13 +408,6 @@ sub vote {
my $aid = $form->{'aid'};
return unless $qid && $aid;
- my $reskey = getObject('Slash::ResKey');
- my $rkey = $reskey->key('pollbooth');
- unless ($rkey->use) {
- print $rkey->errstr;
- return;
- }
-
my(%all_aid) = map { ($_->[0], 1) }
@{$reader->getPollAnswers($qid, ['aid'])};
@@ -430,6 +423,13 @@ sub vote {
if (getCurrentUser('is_anon') && !getCurrentStatic('allow_anon_poll_voting')) {
$notes = getData('anon');
} elsif ($aid > 0) {
+ my $reskey = getObject('Slash::ResKey');
+ my $rkey = $reskey->key('pollbooth');
+ unless ($rkey->use) {
+ print $rkey->errstr;
+ return;
+ }
+
my $poll_open = $reader->isPollOpen($qid);
my $has_voted = $slashdb->hasVotedIn($qid);

0 comments on commit 2e7cbb0

Please sign in to comment.