diff options
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index 3d356cc40..882fa30be 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -801,6 +801,9 @@ sub process_report : Private { # set these straight from the params $report->category( _ $params{category} ) if $params{category}; + # if there is a Message Manager message ID, save it + $report->mm_msg_id( $params{mm_msg_id} ) if $params{mm_msg_id}=~/^\d+$/; + my $areas = $c->stash->{all_areas}; $report->areas( ',' . join( ',', sort keys %$areas ) . ',' ); @@ -1001,11 +1004,6 @@ sub save_user_and_report : Private { # Set unknown to DB unknown $report->council( undef ) if $report->council eq '-1'; - # if there is a Message Manager message ID, pass it back to the client view - if ($c->req->param('mm_msg_id')) { - $report->service( $c->req->param('mm_msg_id') ); - } - # save the report; $report->in_storage ? $report->update : $report->insert(); @@ -1070,6 +1068,7 @@ sub redirect_or_confirm_creation : Private { $c->forward( 'create_reporter_alert' ); my $report_uri = $c->uri_for( '/report', $report->id ); $c->log->info($report->user->id . ' was logged in, redirecting to /report/' . $report->id); + XXXX $c->res->redirect($report_uri); $c->detach; } |