Changeset 198 for trunk/lib/Vote/Controller/Admin.pm
- Timestamp:
- 04/15/09 03:51:26 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Vote/Controller/Admin.pm
r190 r198 24 24 sub begin : Private { 25 25 my ( $self, $c, @args ) = @_; 26 $c->model('Vote')-> db->rollback;26 $c->model('Vote')->rollback; 27 27 } 28 28 … … 43 43 if ($c->req->param('addch')) { 44 44 $vote->vote_add_choice($id, $c->req->param('addch')) 45 and $vote-> db->commit;45 and $vote->commit; 46 46 } elsif ($c->req->param('delch')) { 47 47 $vote->delete_choice($c->req->param('delch')) 48 and $vote-> db->commit;48 and $vote->commit; 49 49 } elsif ($c->req->param('pollparam')) { 50 50 if ($c->req->param('dstart')) { … … 77 77 grep { exists($c->req->params->{$_}) } 78 78 qw(label description start end choice_count free_choice) 79 ) and $vote-> db->commit;79 ) and $vote->commit; 80 80 } elsif ($c->req->param('encrypted')) { 81 81 my $passphrase = $c->req->param('passphrase') || 82 82 $c->session->{'vpass' . $c->stash->{voteid}}; 83 83 $poll->gen_poll_keys($passphrase) 84 and $vote-> db->commit;84 and $vote->commit; 85 85 } elsif ($c->req->param('notcrypted')) { 86 86 $poll->param(public_key => undef, private_key => undef) 87 and $vote-> db->commit;87 and $vote->commit; 88 88 } 89 89 }; … … 95 95 $upload->fh, 96 96 $c->req->param('delete'), 97 ) and $vote-> db->commit;97 ) and $vote->commit; 98 98 } elsif($c->req->param('delvoting')) { 99 99 $vote->delete_voting($c->req->param('delvoting')) 100 and $vote-> db->commit;100 and $vote->commit; 101 101 } elsif ($c->req->param('mail')) { 102 102 $vote->addupd_voting($id, $c->req->param('mail'), $c->req->param('id')) 103 and $vote-> db->commit;103 and $vote->commit; 104 104 } elsif($c->req->param('mailpasswd')) { 105 105 # TODO … … 137 137 } elsif($c->req->param($bid) eq 'invalid') { 138 138 $vote->mark_ballot_invalid($bid, 1); 139 $vote-> db->commit;139 $vote->commit; 140 140 } elsif($c->req->param($bid) eq 'valid') { 141 141 $vote->mark_ballot_invalid($bid, 0); 142 $vote-> db->commit;142 $vote->commit; 143 143 } 144 144 }
Note: See TracChangeset
for help on using the changeset viewer.