From 76d97609c3b08bc079540ffb64b9a0f16f0f878e Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Thu, 11 Apr 2013 10:36:18 +0100 Subject: 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 --- perllib/FixMyStreet/App/Controller/Tokens.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'perllib/FixMyStreet/App/Controller/Tokens.pm') 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; } -- cgit v1.2.3