Changeset 219 for trunk/lib/Vote/Controller/Ballot.pm
- Timestamp:
- 04/19/09 20:06:03 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Vote/Controller/Ballot.pm
r207 r219 88 88 my @sbalval = grep { $_ } map { lc($choices{$_} || '') } $c->req->param('sbal'); 89 89 90 if (scalar(@sbalval) + scalar(@{$c->stash->{fsbal} || []})91 90 my @ballot = grep { $_ } (@sbalval, @{$c->stash->{fsbal} || []}); 91 if (scalar(@ballot) > $poll->info('choice_count')) { 92 92 $c->req->parameters->{'ballot'} = ''; 93 93 $c->stash->{vote_error} = 'Seulement ' . … … 97 97 { 98 98 my %uniq; 99 foreach(@ sbalval, @{$c->stash->{fsbal} || []}) {99 foreach(@ballot) { 100 100 $uniq{lc($_)} ||= 0; # avoid undef 101 101 $uniq{lc($_)}++; … … 113 113 $c->stash->{ballotid} = $poll->register_ballot( 114 114 $mail, 115 [ @sbalval ], 116 [ @{ $c->stash->{fsbal} } ], 115 [ @ballot ], 117 116 $c->req->address, 118 117 ); # TODO trap error
Note: See TracChangeset
for help on using the changeset viewer.