diff options
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index c09b721b9..08d0addb9 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,12 +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')) { - $c->stash->{mm_msg_id} = $c->req->param('mm_msg_id'); - $report->service( $c->req->param('mm_msg_id') ); - } - # save the report; $report->in_storage ? $report->update : $report->insert(); @@ -1077,6 +1074,7 @@ sub redirect_or_confirm_creation : Private { $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; } |