- Timestamp:
- 03/07/09 20:53:41 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Vote/Controller/Ballot.pm
r18 r19 68 68 s/\s+$//; 69 69 s/\s+/ /g; 70 $_70 lc($_) 71 71 } ($c->req->param('fsbal')) ]; 72 72 … … 76 76 ); 77 77 78 warn $vote->vote_info($id)->{choice_count};79 warn scalar(@torecord);80 warn $_ foreach(@torecord);81 78 if (scalar(@torecord) > $vote->vote_info($id)->{choice_count}) { 82 79 $c->req->param('ballot', ''); … … 84 81 $vote->vote_info($id)->{choice_count} . ' choix possible'; 85 82 return; 83 } 84 { 85 my %uniq; 86 $uniq{lc($_)} foreach(@torecord); 87 if (scalar(keys %uniq) != scalar(@torecord)) { 88 $c->req->param('ballot', ''); 89 $c->stash->{vote_error} = 'Une valeur est en double'; 90 return; 91 } 86 92 } 87 93
Note: See TracChangeset
for help on using the changeset viewer.