diff options
author | Struan Donald <struan@mysociety.org> | 2013-04-11 10:36:18 +0100 |
---|---|---|
committer | Struan Donald <struan@mysociety.org> | 2013-04-11 10:36:18 +0100 |
commit | 76d97609c3b08bc079540ffb64b9a0f16f0f878e (patch) | |
tree | f3aec1aedcbb7862c91b2ec916ae8dc16d0d502e | |
parent | 24185a5bdbfa10c04bc15a399204c84550b167e8 (diff) |
If a comment is already confirmed then just log the user in and forward them to
the report page rather than reconfirming the report, which may alter the status
of reports
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Tokens.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Tokens.pm b/perllib/FixMyStreet/App/Controller/Tokens.pm index 1207d39ea..5e536afa3 100644 --- a/perllib/FixMyStreet/App/Controller/Tokens.pm +++ b/perllib/FixMyStreet/App/Controller/Tokens.pm @@ -195,7 +195,12 @@ sub confirm_update : Path('/C') { $c->authenticate( { email => $comment->user->email }, 'no_password' ); $c->set_session_cookie_expire(0); - $c->forward('/report/update/confirm'); + if ( $comment->confirmed ) { + my $report_uri = $c->cobrand->base_url_for_report( $comment->problem ) . $comment->problem->url; + $c->res->redirect($report_uri); + } else { + $c->forward('/report/update/confirm'); + } return 1; } |