aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report/New.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report/New.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 011e9e4b6..b0b338c69 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -1002,11 +1002,12 @@ sub save_user_and_report : Private {
$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')=~/^\d+$/) {
- $c->stash->{mm_msg_id} = $c->req->param('mm_msg_id');
- $report->mm_msg_id( $c->req->param('mm_msg_id') );
- }
-
+ if ($c->cobrand->moniker eq 'fixmybarangay' && $c->req->param('external_source_id')=~/^\d+$/) {
+ $c->stash->{external_source_id} = $c->req->param('external_source_id');
+ $report->external_source_id( $c->req->param('external_source_id') );
+ $report->external_source( $c->config->{MESSAGE_MANAGER_URL} ) ;
+ }
+
# save the report;
$report->in_storage ? $report->update : $report->insert();
@@ -1071,8 +1072,8 @@ sub redirect_or_confirm_creation : Private {
$c->forward( 'create_reporter_alert' );
my $report_uri;
- if ( $c->cobrand->moniker eq 'fixmybarangay' && $c->user->from_council && $c->stash->{mm_msg_id}) {
- $report_uri = $c->uri_for( '/report', $report->id, undef, { mm_msg_id => $c->stash->{mm_msg_id} } );
+ if ( $c->cobrand->moniker eq 'fixmybarangay' && $c->user->from_council && $c->stash->{external_source_id}) {
+ $report_uri = $c->uri_for( '/report', $report->id, undef, { external_source_id => $c->stash->{external_source_id} } );
} else {
$report_uri = $c->uri_for( '/report', $report->id );
}