- Timestamp:
- 04/21/09 00:15:30 (15 years ago)
- Location:
- trunk/lib/Vote/Controller
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Vote/Controller/Admin.pm
r224 r226 187 187 } 188 188 189 sub voting: LocalRegex('^(\ d+)/voting$') {189 sub voting: LocalRegex('^(\w+)/voting$') { 190 190 my ($self, $c) = @_; 191 191 ($c->stash->{voteid}) = @{ $c->req->snippets || [] }; … … 202 202 } 203 203 204 sub ballot: LocalRegex('^(\ d+)/ballot$') {204 sub ballot: LocalRegex('^(\w+)/ballot$') { 205 205 my ($self, $c) = @_; 206 206 ($c->stash->{voteid}) = @{ $c->req->snippets || [] }; … … 217 217 } 218 218 219 sub privatekey : LocalRegex('^(\ d+)/privatekey$') {219 sub privatekey : LocalRegex('^(\w+)/privatekey$') { 220 220 my ($self, $c) = @_; 221 221 ($c->stash->{voteid}) = @{ $c->req->snippets || [] }; -
trunk/lib/Vote/Controller/Newpoll.pm
r198 r226 69 69 my $pid = $c->model('Vote')->poll_from_request($id, $c->req->param('passwd')); 70 70 $c->session->{'vpass' . $pid} = $c->req->param('passwd'); # avoid auth on admin page 71 $c->res->redirect($c->uri_for('/admin', $ pid));71 $c->res->redirect($c->uri_for('/admin', $c->model('Vote')->poll($pid)->uid)); 72 72 } 73 73 } -
trunk/lib/Vote/Controller/Vote.pm
r218 r226 41 41 } 42 42 43 sub report: LocalRegex('^(\ d+)/(results|report).(\w+)$') {44 my ($self, $c , $id, @sub) = @_;43 sub report: LocalRegex('^(\w+)/(results|report).(\w+)$') { 44 my ($self, $c) = @_; 45 45 my $doc; 46 46 ($c->stash->{voteid}, $doc, $c->stash->{format}) = @{ $c->req->snippets || [] }; … … 54 54 # Ensure report is not availlable before end of poll 55 55 if ($vote->poll($c->stash->{voteid})->status ne 'AFTER') { 56 $c->res->redirect($c->uri_for('/vote', $ c->stash->{voteid}));56 $c->res->redirect($c->uri_for('/vote', $vote->poll($c->stash->{voteid})->uid)); 57 57 return; 58 58 };
Note: See TracChangeset
for help on using the changeset viewer.