aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm3
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm4
-rw-r--r--perllib/FixMyStreet/App/Controller/Tokens.pm2
3 files changed, 7 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index 081256fe2..13a347a90 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -167,6 +167,9 @@ sub format_problem_for_display : Private {
}
$c->stash->{extra_name_info} = $problem->bodies_str && $problem->bodies_str eq '2482' ? 1 : 0;
+ if ( $c->sessionid && $c->flash->{created_report} ) {
+ $c->stash->{created_report} = $c->flash->{created_report};
+ }
$c->forward('generate_map_tags');
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 761215344..4a5e11573 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -1155,7 +1155,9 @@ sub redirect_or_confirm_creation : Private {
$report_uri = $c->cobrand->base_url_for_report( $report ) . $report->url;
}
$c->log->info($report->user->id . ' was logged in, redirecting to /report/' . $report->id);
- $c->flash->{created_report} = 'loggedin';
+ if ( $c->sessionid ) {
+ $c->flash->{created_report} = 'loggedin';
+ }
$c->res->redirect($report_uri);
$c->detach;
}
diff --git a/perllib/FixMyStreet/App/Controller/Tokens.pm b/perllib/FixMyStreet/App/Controller/Tokens.pm
index 19130e25f..44cb2429d 100644
--- a/perllib/FixMyStreet/App/Controller/Tokens.pm
+++ b/perllib/FixMyStreet/App/Controller/Tokens.pm
@@ -102,7 +102,7 @@ sub confirm_problem : Path('/P') {
$c->res->redirect($report_uri);
}
- $c->flash->{created_report} = 'fromemail';
+ $c->stash->{created_report} = 'fromemail';
return 1;
}